View Single Post
  #17   Spotlight this post!  
Unread 05-04-2010, 00:13
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,170
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: Suggestion for next year's WPILib

Quote:
Originally Posted by mikets View Post
It's good in theory but I do worry students may not understand multi-threaded programming. They need to learn inter-thread synchronization and exclusive access (e.g. semaphores). BTW, is it true that semaphores in vxWorks is not counting semaphores? I can't acquire the semaphore again in the same thread?
VxWorks has counting semaphores, binary semaphores and mutex semaphores. The C functions to create them are semCCreate, semBCreate and semMCreate. After creation semTake and semGive are used for all 3 types. I think the POSIX semaphores are really VxWorks counting semaphores. The POSIX mutexes are implemented using VxWorks mutex semaphores.

VxWorks also has public (inter-process) versions of all these types but we don't use them for FIRST (processes are not used, just kernel mode tasks/threads)

Hope this helps
Reply With Quote