/
vTech
/
FcApps
Обзор
Документация
Войти
/
vTech
/
FcApps
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
FcLibs/FcThread/src/FcThread_PTHREAD.h
59 строк
943 B
vTech
alpha_00
03 дек 2025, 17:45
03 дек 2025, 17:45
ab8382d
Код
Авторство
О чём код?
#ifdef __linux__ #ifndef FC_PTHREAD_H #define FC_PTHREAD_H #ifndef __USE_GNU #define __USE_GNU #endif #include <errno.h> #include <pthread.h> #include <semaphore.h> #include <stdbool.h> #include <sys/timerfd.h> #ifndef O_CREAT #define O_CREAT 0x0008 #endif #ifndef O_EXCL #define O_EXCL 0x0010 #endif #ifndef EOWNERTERM #define EOWNERTERM 3462 #endif #ifndef EDESTROYED #define EDESTROYED 3463 #endif #ifndef ERECURSE #define ERECURSE 3419 #endif #define FcSemaphoreN_Dec FcSemaphore_Dec #define FcSemaphoreN_Inc FcSemaphore_Inc typedef struct { pthread_mutex_t mMutex; pthread_cond_t mEvent; bool mFlag; }FcEvent_t; typedef pthread_t FcThread_t; typedef pthread_mutex_t FcMutex_t; typedef sem_t FcSemaphore_t; typedef int BOOL; typedef char TCHAR; typedef struct _FcThread_settings_t { void *(*f)(void *); void *arg; } FcThread_settings_t; #undef __USE_GNU #endif // FC_PTHREAD_H #endif // linux