代码拉取完成,页面将自动刷新
#ifndef FIO_SEM_H
#define FIO_SEM_H
#include <pthread.h>
#include "lib/types.h"
#define FIO_SEM_MAGIC 0x4d555445U
struct fio_sem {
pthread_mutex_t lock;
pthread_cond_t cond;
int value;
int waiters;
int magic;
};
enum {
FIO_SEM_LOCKED = 0,
FIO_SEM_UNLOCKED = 1,
};
extern int __fio_sem_init(struct fio_sem *, int);
extern struct fio_sem *fio_sem_init(int);
extern void __fio_sem_remove(struct fio_sem *);
extern void fio_sem_remove(struct fio_sem *);
extern void fio_sem_up(struct fio_sem *);
extern void fio_sem_down(struct fio_sem *);
extern bool fio_sem_down_trylock(struct fio_sem *);
extern int fio_sem_down_timeout(struct fio_sem *, unsigned int);
#endif
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。