Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

pThreads vs. VxWorks Threads

1,215 views
Skip to first unread message

Sean

unread,
Jul 6, 2006, 11:32:40 AM7/6/06
to
I recently started working in Threads using VxWorks threads, like
taskSpawn, however I was told that the board we may be moving to may
not support VxWorks threads so I have to redo everything in POSIX
Threads.

I started doing it and I can see almost the functionality from VxWorks,
but the functions don't seem as user friendly.

Do people typically make their own functions that use the functionality
of POSIX threads, so they can hide a lot of the complexity? Or do they
usually just use these functions like

pthread_create, pthread_cond_wait on their own?

I am hoping i could find some examples of people "wrapping" these
functions in other functions to save me the time of doing it myself.

LarryC

unread,
Jul 6, 2006, 3:35:08 PM7/6/06
to
I don't have access to any survey's, but I'd guess most people use the
vxWorks taskLib calls directly. Lately, we've been using the posix
libraries, so that we can run code on Solaris directly and the run on
our target.

So, if you are thinking of swiching OSes in the future, I'd use Posix,
otherwise my preference is to use the taskLib calls directly w/o the
added overhead of another layer.

Note that if you use the posix layer, you'll end up with a lot of tasks
called pThread1, pThread2, etc., which makes using the debugger a bit
of a challenge when trying to figure out what's going on.

If you do find the need to rapidly port a lot of code, I'd recommend
www.mapusoft.com. They have libraries available to use almost any RTOS
API on almost any other target RTOS, including that open source OS
that's becoming more popular in non-realtime embeddded systems.

Good luck,
lc

Jeffrey Creem

unread,
Jul 6, 2006, 7:09:06 PM7/6/06
to
Sean wrote:
> I recently started working in Threads using VxWorks threads, like
> taskSpawn, however I was told that the board we may be moving to may
> not support VxWorks threads so I have to redo everything in POSIX
> Threads.
>

Is it that the new board does not support vxWorks or has someone told
you that the new board does not support vxWorks threads(tasks) but
somehow supports vxWorks? If the former, then obviously you should
minimize use of all vxWorks specific calls. If the latter, then I think
someone is confused.

Me, I just always use Ada tasking and then I don't worry about it.

LarryC

unread,
Jul 7, 2006, 4:24:19 PM7/7/06
to
I remeber the first version of Verdix Ada for 68K - all the Ada tasks
ran as one vxWorks tasks, which made things very strange when doing
things that blocked. They eventually did fix that.

lc

Jeffrey Creem

unread,
Jul 8, 2006, 7:43:57 AM7/8/06
to
LarryC wrote:
> I remeber the first version of Verdix Ada for 68K - all the Ada tasks
> ran as one vxWorks tasks, which made things very strange when doing
> things that blocked. They eventually did fix that.
>
That is true...But I stopped worrying about that sort of broken
implementation
about the time the last Culture Club/Boy George song fell off the top 40
list :)

0 new messages