LearnHouse

Archive for 六月 5th, 2019

[轉]Linux IPC System V 信号量

資料來源:https://www.cnblogs.com/xiaojiang1025/p/5936135.html

模型

#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
ftok()              //获取key                 
semget()            //创建/获取信号量集     
semctl()            //初始化信号量集           
semop()             //操作信号量集            
semctl()            //删除信号量集            

Read more...

posted by admin in 程式&軟體 and have No Comments