feat: cleanup and daemonization
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
#ifndef SCI_CLI_H
|
||||
#define SCI_CLI_H
|
||||
#include <stdio.h>
|
||||
#include "optional.h"
|
||||
#include <stdio.h>
|
||||
|
||||
typedef struct {
|
||||
optional_str config_file;
|
||||
|
@ -1,9 +1,7 @@
|
||||
#ifndef SCI_LOG_H
|
||||
#define SCI_LOG_H
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
// TODO: Thread safety!
|
||||
enum {
|
||||
LOG_TRACE = 4,
|
||||
LOG_INFO = 3,
|
||||
|
@ -2,7 +2,6 @@
|
||||
#define SCI_PIPELINE_H
|
||||
#include "optional.h"
|
||||
#include <pthread.h>
|
||||
#include <sys/inotify.h>
|
||||
|
||||
typedef struct {
|
||||
char* name;
|
||||
|
@ -1,9 +1,8 @@
|
||||
#ifndef SCI_THREADPOOL_H
|
||||
#define SCI_THREADPOOL_H
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include "optional.h"
|
||||
#include <pthread.h>
|
||||
// Very inspired by: https://nachtimwald.com/2019/04/12/thread-pool-in-c/
|
||||
#include <stdbool.h>
|
||||
|
||||
// a work function
|
||||
typedef void (*thread_func)(void *arg);
|
||||
@ -14,6 +13,7 @@ typedef struct threadpool_work {
|
||||
void* arg;
|
||||
struct threadpool_work* next;
|
||||
} threadpool_work;
|
||||
typedef optional_type(threadpool_work*) optional_threadpool_work;
|
||||
|
||||
// thread pool object
|
||||
typedef struct {
|
||||
|
Reference in New Issue
Block a user