This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: POSIX timer_create


On Tue, Sep 14, 2004 at 04:00:12AM -0700, Devaughn, Hans wrote:
> Nick,
> 
> Thanks for your reply. 
> 
> We are operating a process control environment where we have a number of
> threads which are operating as finite state machines. These threads take in
> requests through a mailbox, process them and sometimes wait for a response
> from another application either on-board or off-board. In the meantime these
> threads must be available to handle additional real-time requests.
> Typically, when we get a request that requires a response we will start a
> fail-safe timer. Either we get the response or a timeout. It is this timer
> that I am trying to implement. 
> 
> The problem with signals is that the thread must wait for the signal and the
> thread becomes blocked.
> 
> The IEEE specifications has a member of the sigevent structure defined as
> "void(*)(unsigned sigval) sigev_notify_function Notification function". This
> is the option I had hoped to use.
> 
> I don't see any way to use the POSIX timers. If we were use the eCos Alarms
> what kind of problems would we be facing? The threads will be created using
> the eCos functions as the POSIX thread functions don't allow us some of the
> functionality we need.

Why not have a timer thread that just sends another signal to the
thread when its timeout occurs?

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]