This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: POSIX timer_create
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: "Devaughn, Hans" <hans dot devaughn at siemens dot com>
- Cc: "'ecos-discuss at ecos dot sourceware dot org'" <ecos-discuss at ecos dot sourceware dot org>
- Date: 14 Sep 2004 11:00:11 +0100
- Subject: Re: [ECOS] POSIX timer_create
- References: <EA78B62757AF1E4799828249310AC4CA060A452E@stca206a.bus.sc.rolm.com>
"Devaughn, Hans" <hans.devaughn@siemens.com> writes:
> The POSIX function timer_create has a parameter (struct sigevent *evp) which
> allows a "user event handler".
>
> The POSIX module, time.cxx, handles a timeout of the a timer in function
> alarm_action. This function checks for SIGEV_SIGNAL and SIGEV_THREAD. The
> latter, SIGEV_THREAD, has a comment "FIXME: implement SIGEV_THREAD".
>
> I am assuming the SIGEV_THREAD is the option for the user event handler.
SIGEV_THREAD means "Create a new thread and call the notify function
on it". This is expensive, complicated and full of potential pitfalls,
so we have not implemented it.
Where does this reference to a "user event handler" come from? As far
as I am aware, POSIX only defines the SIGEV_SIGNAL and SIGEV_THREAD
events.
>
> My question - Has anyone implemented this POSIX feature? If not, is there
> any other way to do this other than using eCos alarms?
As far as POSIX timers are concerned, delivering a signal is the
only mechanism currently supported. Why is that no suitable? Mixing
POSIX and non-POSIX features can be dangerous.
--
Nick Garnett eCos Kernel Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss