Skip to content
Snippets Groups Projects
Commit 47ad6fa4 authored by Thierno souleymane Bah's avatar Thierno souleymane Bah
Browse files

feat(semanphore with scheduling done)

parent 5acd350c
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,7 @@ typedef enum ...@@ -11,6 +11,7 @@ typedef enum
{ {
CTX_INIT, CTX_INIT,
CTX_EXEC, CTX_EXEC,
CTX_WAIT,
CTX_END CTX_END
} ctx_status_t; } ctx_status_t;
...@@ -23,6 +24,7 @@ typedef struct ctx_s ...@@ -23,6 +24,7 @@ typedef struct ctx_s
void *args; void *args;
ctx_status_t status; ctx_status_t status;
struct ctx_s *next_ctx; struct ctx_s *next_ctx;
struct ctx_s *sem_next_ctx;
char used; char used;
} ctx_t; } ctx_t;
......
#include "context.h" #include "context.h"
#include "utils.h" #include "utils.h"
static ctx_t *current_ctx = NULL; ctx_t *current_ctx = NULL;
static ctx_t *ring_ctx = NULL; ctx_t *ring_ctx = NULL;
ctx_t *malloc_ctx() ctx_t *malloc_ctx()
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment