|
From: Nicholas N. <nj...@cs...> - 2005-05-20 13:25:12
|
On Thu, 19 May 2005, Jeremy Fitzhardinge wrote: > There's no strong reason to keep it, but it's nice to have multiple > implementations of the semaphore so that the fact that the current one > is implemented with a pipe doesn't become part of the interface. Other > systems will want other synchronization primitives; pipes are fairly > universal, but not necessarily efficient (though they're pretty close to > optimal on Linux). This is the full interface, right? void VGO_(sema_init) (vg_sema_t *); void VGO_(sema_deinit)(vg_sema_t *); void VGO_(sema_down) (vg_sema_t *sema); void VGO_(sema_up) (vg_sema_t *sema); That's pretty simple. (Which is great!) If we make vg_sema_t an abstract type, it seems unlikely that anything about pipes will become part of the interface. I think I'll make the change soon. N |