General libpoet Questions

13 views
Skip to first unread message

raohara

unread,
Jun 27, 2008, 2:09:16 PM6/27/08
to libpoet: Parallel Object Execution Threads
I am thinking of using libpoet in an embedded system that uses a
RTOS. Since libpoet uses boost::thread I believe I have to port at
least some portions of boost::thread. What portions of boost::thread
does libpoet use?

Since I am using a RTOS my plan is replace the active object scheduler
with the RTOS scheduler and use the RTOS queue in place of the
activation queue. Are there any major issues involved with making
those kinds of substitutions?

One other idea is to use state machines from boost::statechart as the
servant. I can't find mention of the servant in the libpoet code so I
am assuming that the servant implementation does not matter. Is my
assumption correct?

Regards,

Rich

Frank Mori Hess

unread,
Jun 27, 2008, 9:53:49 PM6/27/08
to lib...@googlegroups.com
On Friday 27 June 2008 14:09, raohara wrote:
> I am thinking of using libpoet in an embedded system that uses a
> RTOS. Since libpoet uses boost::thread I believe I have to port at
> least some portions of boost::thread. What portions of boost::thread
> does libpoet use?

boost::thread, condition, mutex, and locks. The acyclic_mutex stuff uses
thread_specific_ptr.

> Since I am using a RTOS my plan is replace the active object scheduler
> with the RTOS scheduler and use the RTOS queue in place of the
> activation queue. Are there any major issues involved with making
> those kinds of substitutions?

I don't know, as I don't know what your RTOS scheduler/queue do. But I'd
blindly guess your RTOS scheduler deals with handing out timeslices to
different threads/processes, which isn't really what poet::scheduler is
doing.

> One other idea is to use state machines from boost::statechart as the
> servant. I can't find mention of the servant in the libpoet code so I
> am assuming that the servant implementation does not matter. Is my
> assumption correct?

Your servant object can be used to provide the "passive function" parameter
when creating an active_function. The active_object_example.cpp example
program in the documentation may be helpful.

Reply all
Reply to author
Forward
0 new messages