摘要: 以下是对信号量的处理函数,用于进程间通信(IPC)sem_acquire — Acquire a semaphoresem_get — Get a semaphore idsem_release — Release a semaphoresem_remove — Remove a semaphore$key=ftok(__FILE__,'t');$seg_id=sem_get($key); //获取一个信号idsem_acquire($seg_id); //取的信号//do somethingsem_release($seg_id); //释放信号量sem_remove($se 阅读全文
posted @ 2012-11-23 09:31 涛光 阅读(470) 评论(0) 推荐(0) 编辑
摘要: msg_get_queue — Create or attach to a message queuemsg_queue_exists — Check whether a message queue existsmsg_receive — Receive a message from a message queuemsg_remove_queue — Destroy a message queuemsg_send — Send a message to a message queuemsg_set_queue — Set information in the message queue dat 阅读全文
posted @ 2012-11-23 09:31 涛光 阅读(1028) 评论(0) 推荐(0) 编辑
摘要: 以下是php的共享内存常用函数,用于进程间的通信shm_attach — Creates or open a shared memory segmentshm_detach — Disconnects from shared memory segmentshm_get_var — Returns a variable from shared memoryshm_has_var — Check whether a specific entry existsshm_put_var — Inserts or updates a variable in shared memoryshm_remove_ 阅读全文
posted @ 2012-11-23 09:31 涛光 阅读(1221) 评论(0) 推荐(0) 编辑