当前位置:网站首页>B_ QuRT_ User_ Guide(16)
B_ QuRT_ User_ Guide(16)
2022-06-11 03:08:00 【weixin_ thirty-eight million four hundred and ninety-eight thou】
B_QuRT_User_Guide(16)
10 All-signals
Threads depend on the occurrence of one or more internal events , Use all signals to synchronize their execution . All signals are stored in a shared object , The following operations are supported .
If one or more signals are set at All-signal In the object , And a thread is All-signal Object to wait for the setting of this particular semaphore set , Then the thread is awakened . If the awakened thread has a higher priority than the current thread , Then context switching will occur .
Different from any signal ,all-signals There is no need to explicitly clear before waiting for the signal again all-signal Any setting signal in the object – The clearing operation is automatically completed by the waiting operation .
One all-signal Object contains 32 A signal , These signals are in a 32 The value of the bit is expressed as 0-31 position . A value 0 Indicates that the signal is set ,1 Indicates that the signal is cleared ( This is the opposite of the definition of any signal ).
Be careful : At any time , At most one thread can wait on a fully signaled object .
Because the clearing of the signal is completed by the waiting operation , So there is no clear operation defined for all signals .
All signal services can be provided through the following QuRT Function access .- qurt_allsignal_destroy()
- qurt_allsignal_get()
- qurt_allsignal_init()
- qurt_allsignal_set() - qurt_allsignal_wait() - data type
10.1 qurt_allsignal_destroy()
10.1.1 Function Documentation
10.1.1.1 void qurt_allsignal_destroy ( qurt_allsignal_t ∗ signal )
Destroy all specified signal objects .
Be careful : When all signal objects are no longer used , It must be destroyed . Failure to do so will result in QuRT Kernel resource leak .
All signal objects cannot be destroyed while still in use . If this happens ,QuRT The behavior of will not be defined .
Related data types
qurt_allsignal_t
Parameters 
Return value
None.
Dependency relationship
None.
10.2 qurt_allsignal_get()
10.2.1 Function Documentation
10.2.1.1 sstatic unsigned int qurt_allsignal_get ( qurt_allsignal_t ∗ signal )
from All-signal Object to get the signal value .
Returns the specified all-signal The current signal value of the object .
Related data types
qurt_allsignal_t
Parameters

Return value
None.
Dependency relationship
None.
10.3 qurt_allsignal_init()
10.3.1 Function Documentation
10.3.1.1 void qurt_allsignal_init ( qurt_allsignal_t ∗ signal )
Initialize all signal objects .
All signal objects are initially cleared .
Related data types
qurt_allsignal_t
Parameters 
Return value
None.
Dependency relationship
None.
10.4 qurt_allsignal_set()
10.4.1 Function Documentation
10.4.1.1 void qurt_allsignal_set ( qurt_allsignal_t ∗ signal, unsigned int mask )
Sets the signal in the specified full signal object .
The signal is 32 The bit mask value is represented as the... Th 0 To 31 position . The mask bit value is 1 Indicates that the signal must be set ,0 Indicates that the signal is not set .
Related data types
qurt_allsignal_t
Parameters 
Return value
None.
Dependency relationship
None.
10.5 qurt_allsignal_wait()
10.5.1 Function Documentation
10.5.1.1 void qurt_allsignal_wait ( qurt_allsignal_t ∗ signal, unsigned int mask )
Wait on all signal objects .
Pause current thread , Until all specified signals are set . The signal is 32 The bit mask value is represented as the... Th 0 To 31 position . The mask bit value is 1 Indicates that you must wait for a signal ,0 No need to wait .
If a signal is set in a full signal object , And a thread is waiting for the signal on the full signal object , Then the thread will be awakened . If the awakened thread has a higher priority than the current thread , Then context switching will occur .
Different from any signal ,all-signals There is no need to explicitly clear before waiting for the signal again all-signal Any setting signal in the object – The clearing operation is automatically completed by the waiting operation .
Be careful : At any time , At most one thread can be in one all-signal Wait on the object . Because the signal is cleared by wait It's done , So not for all-signals Define the purge operation .
Related data types
qurt_allsignal_t
Parameters 
Return value
None.
Dependency relationship
None.
10.6 Data Types
This section describes the data types of full signal service .
- All signals are in QuRT Is represented as qurt_allsignal_t Object of type .
10.6.1 Data Structure Documentation
10.6.1.1 union qurt_allsignal_t
qurt_signal_t To replace the qurt_allsignal_t. This type definition was added for backward compatibility .
边栏推荐
- Live broadcast! Feature matching of orb-slam3 series (mlpnp, word bag model, etc.).
- MySQL is required to sort in ascending order greater than or equal to the current time, and then in descending order less than the current time
- Three ways of reflection
- 判断一串数字是否是快速排序某一次的结果
- Location data fusion Table 3
- 通过程序启动QQ,实现自动登录.
- GraphAcademy 课程讲解:《Neo4j 图数据科学基础》
- Log4j:error category option "1" not a decimal integer
- 数组全全排列
- . Net module and assembly - NET Module vs Assembly
猜你喜欢

intXX_ T and int_ fastXX_ T what is the difference- What is the difference between intXX_ t and int_ fastXX_ t?

三维GIS行业需求及展望

Basic use of sonarqube platform

How can Delma's own brand "take off" when Philips is listed on the market?

Arduino Uno接JQ8900-16p语音播报模块

Hough transform of image

How to ensure reliable delivery of messages?

Explication du cours de graphacademy: neo4j Graph Data Science Foundation

VMware虚拟机IP,网关设置。虚拟机ping不通外网

TCP/IP
随机推荐
数据库唯一索引和普通索引的区别?
Recent learning and update plan
Arduino Uno接JQ8900-16p语音播报模块
反射三种方式
MySQL is required to sort in ascending order greater than or equal to the current time, and then in descending order less than the current time
VMware virtual machine IP, gateway settings. The virtual machine cannot be pinged to the Internet
TCP/IP
怎样简洁明了地说清楚产品需求?
How can Delma's own brand "take off" when Philips is listed on the market?
Deep parsing of question mark expressions
Start QQ through the program to realize automatic login
[long time series prediction] aotoformer code detailed [3] model overall architecture analysis
Android P SoftAP start process
【大咖秀】博睿数据眼中的AIOps,选择正确的赛道正确的人
通过程序启动QQ,实现自动登录.
Question bank and answers for 2022 melting welding and thermal cutting operation certificate examination
CPT 102_ LEC 20
postgresql源码学习(22)—— 故障恢复③-事务日志的注册
ASLR
The two departments jointly issued the nine provisions on fire safety management of off campus training institutions