1:IPC名字mq_XXX,sem_XXX,shm_XXX.
消息队列 |
信号量 |
共享内存区 |
|
<mqueue.h> |
<semaphore.h> |
<sys.mman.h> |
|
创建,打开或删除 |
mq_open mq_close mq_unlink |
sem_open sem_close sem_unlink |
shm_open shm_close shm_unlink |
sem_init sem_destroy |
|||
控制IPC操作的函数 |
mq_getattr mq_setattr |
ftruncate fstat |
|
IPC操作函数 |
mq_send mq_receive mq_notify |
sem_wait sem_post sem_trywait sem_getvalue |
mmap mumap |
2.System V函数
消息队列 |
信号量 |
共享内存区 |
|
<sys/msg.h> |
<sys/sem.h> |
<sys/shm.h> |
|
创建或打开 |
msgget |
semget |
shmget |
msgctl |
semctl |
shmctl |
|
msgsend msgrev |
semop |
shmat shmdt |
时间: 2024-10-13 15:15:33