This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: How to debug synchronisation in the usbs.c in a new usb-driver for the ARM at91sam7s...
- From: Bart Veer <bartv at ecoscentric dot com>
- To: rob at mobilia-os dot com
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Tue, 21 Feb 2006 20:35:19 +0000 (GMT)
- Subject: Re: [ECOS] How to debug synchronisation in the usbs.c in a new usb-driver for the ARM at91sam7s...
- References: <00c801c63718$9d660710$6601a8c0@Burnt>
>>>>> "Rob" == Robert Bryce <rob@mobilia-os.com> writes:
>> If I had my way, mutexes and condition variables would be the only
>> synchronization primitives available in the OS.
Rob> Hm. I will agree that one set of primitives is all that an OS
Rob> needs to provide. Keeps the model simpler. I'm really
Rob> indifferent on which set, though I do prefer semaphores. In
Rob> the end, it's just not a big deal.
I would disagree. From a theoretical perspective it is true that
everything can be done with just mutexes and condition variables. That
is a general-purpose combination. Also it is true that having too many
primitives causes confusion and makes maintenance more difficult.
However other primitives, especially semaphores, allow certain common
operations to be performed using less code, less data, fewer cpu
cycles, and less impact on real-time responsiveness. I would not want
semaphores as my only primitive, but I also do not want
mutexes/condition variables as the only one.
Bart
--
Bart Veer eCos Configuration 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