mirror of
https://github.com/Karaka-Management/cOMS.git
synced 2026-01-11 19:28:40 +00:00
36 lines
554 B
C
36 lines
554 B
C
/**
|
|
* Jingga
|
|
*
|
|
* @copyright Jingga
|
|
* @license OMS License 2.0
|
|
* @version 1.0.0
|
|
* @link https://jingga.app
|
|
*/
|
|
#ifndef TOS_THREADS_JOB_H
|
|
#define TOS_THREADS_JOB_H
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
#include "ThreadOSDefines.h"
|
|
|
|
struct job_t {
|
|
ThreadJobFunc func;
|
|
void *arg;
|
|
int state;
|
|
job_t *next;
|
|
};
|
|
|
|
typedef job_t ThreadJob;
|
|
|
|
struct Worker {
|
|
int index; // @todo When are we using this?
|
|
int state;
|
|
|
|
pthread_t thread;
|
|
pthread_cond_t condition;
|
|
int mutex_size;
|
|
pthread_mutex_t* mutex;
|
|
};
|
|
|
|
#endif |