使用sigevent创建多个计时器 [英] create multiple timers using sigevent
问题描述
嗨,,
i我试图制作一个小型计时器实用程序
i基于 timer_create
使用timer_create api有三种类型的回调:
SIGEV_SIGNAL
SIGEV_THREAD
SIGEV_THREAD_ID
当我创建单一时间所有作品
当我创建超过一次时( SIGEV_SIGNAL + SIGEV_THREAD_ID )
或者一个来自 SIGEV_THREAD 的单个应用程序中的一个;
但是当我尝试混合 SIGEV_THREAD 使用其他类型的计时器( SIGEV_SIGNAL 或 SIGEV_THREAD_ID )
它不起作用。
任何人都知道为什么?
,
i am trying to make a small timer utility
i based on timer_create
there are three types of callbacks using the timer_create api:
SIGEV_SIGNAL
SIGEV_THREAD
SIGEV_THREAD_ID
when i create single time all works
when i create more then one time from (SIGEV_SIGNAL+SIGEV_THREAD_ID)
or more then one from SIGEV_THREAD in a single application it works;
but when i try to mix SIGEV_THREAD with another type of timer ( SIGEV_SIGNAL or SIGEV_THREAD_ID)
it does not work.
any know why ?
推荐答案
这篇关于使用sigevent创建多个计时器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!