Thread safe functions using semaphore in C

前端 未结 0 1972
栀梦
栀梦 2020-11-30 12:06
#include "queue.h"
#include 

sem_t sem;

Queue queueCreate(unsigned capacity){
    sem_init(&sem, 0, 1);
    Queue q = malloc(sizeo         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题