Skip to content

Instantly share code, notes, and snippets.

@oppahero
Created August 3, 2018 04:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oppahero/a093095b594483a0376b36eec4a40ad2 to your computer and use it in GitHub Desktop.
Save oppahero/a093095b594483a0376b36eec4a40ad2 to your computer and use it in GitHub Desktop.
void *gestionarCola1(void* threadid) {
struct Planificador &value = *((struct Planificador *)threadid);
Proceso n = value.getPopCola1(); //El proceso pasa al procesador
cout<<" ATENDIENDO NUEVO PROCESO EN CPU. ID: "<<value.getPopCola1().getId() <<endl;
n.setEstado("Ejecutandose"); //Cambia su estado
n.imprimirDatos(); //Imprimimis datos del proceso en CPU
cout<<endl;
value.cola1.pop(); //Ya no esta en cola
value.setProceso(n);
pthread_exit(NULL);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment