On Wed, Jun 23, 2010 at 05:32:13PM -0700, Matthew Dempsky wrote: > On Wed, Jun 23, 2010 at 4:10 PM, Joerg Goltermann <[email protected]> wrote: > > I am working on a port and need the POSIX function sem_timedwait. Does > > anyone > > have a nice/simple idea how to mimic this function? Is anyone working on an > > implementation in libpthread? > > It looks like it should be simple enough to add. We already have > pthread_cond_timedwait, so sem_timedwait should just be a variant of > sem_wait using that instead of pthread_cond_wait. > > I'll write one up unless someone with actual libpthread expertise > beats me to it. =]
i just wrote it but for some reason is not working as expected, which is odd since it's relying on pthread_cond_timedwait. maybe the tests are wrong. being 2am i think i call it a day. f.-
