From 4c33349f2c34fdec84a2dbf81254b4226f678638 Mon Sep 17 00:00:00 2001 From: Yahya-Ashraf-Mohamed Date: Sat, 24 Dec 2022 11:58:30 +0200 Subject: [PATCH] Fixing Process generator Error --- Header_File/Process_Heap.h | 2 +- process_generator.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Header_File/Process_Heap.h b/Header_File/Process_Heap.h index 1e69897..fd5b797 100644 --- a/Header_File/Process_Heap.h +++ b/Header_File/Process_Heap.h @@ -4,7 +4,7 @@ ============================== */ -//Create Periority queue of processes +//Create Priority queue of processes //original source: http://rosettacode.org/wiki/Priority_queue#C #ifndef OS_STARTER_CODE_PROCESSHEAP_H diff --git a/process_generator.c b/process_generator.c index c1d4e17..bb87590 100644 --- a/process_generator.c +++ b/process_generator.c @@ -75,8 +75,8 @@ int main(int argc, char * argv[]) SendProcess(pNextProcess); //send this process to the scheduler ProcDequeue(Waiting_ProcessQueue, &pNextProcess); //dequeue this process from the processes queue free(pNextProcess); //free memory allocated by this process + kill(Scheduler_Pid, SIGUSR1); //send SIGUSR1 to the scheduler } - usleep(500000); //sleep for 0.5 sec } // Clear all resources || send 0 = normal exit || other = interrupt