Skip to content

Commit

Permalink
fix enqueue bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Srihari Shankar committed Feb 7, 2018
1 parent 0298ffc commit 44b9ebe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Asst1/util.c
Expand Up @@ -14,7 +14,9 @@ void enqueue(threadNode *Node){
//check if the head if the queue is null and initialize relvant values
threadQ* threadq = scheduler->tq[Node->qlevel];
if(threadq == NULL){
threadq = malloc(sizeof(threadQ));
threadq = malloc(sizeof(threadQ));
scheduler->tq[Node->qlevel] = threadq;
//shceduler->tq[0]->fronto
thread_q_init(Node,threadq);
threadq ->size =1;
if(Node->qlevel == 0){
Expand Down

0 comments on commit 44b9ebe

Please sign in to comment.