信号量(semaphore)用来保护共享资源,临界区访问,同步;可以用于生产者-消费者模式中提供事件通知。
如果信号量计数器最大为1,其值可能为0或1,成为二进制信号量。二进制信号量作用类似互斥量,但信号量不支持所有权,不支持优先级继承。
tx_semaphore_id | 信号量ID |
tx_semaphore_name | 信号量名字指针 |
tx_semaphore_count | 信号量计数器 |
tx_semaphore_suspension_list | 信号量挂起队列 |
tx_semaphore_suspended_count | 信号量挂起队列中元素个数 |
tx_semaphore_created_next | 指向下一个信号量指针 |
tx_semaphore_created_previous | 指向前一个信号量指针 |
- created list