This is the mail archive of the ecos-discuss@sourceware.org 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: How to debug synchronisation in the usbs.c in a new usb-driver for the ARM at91sam7s...


>>>>> "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


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