[beports] Re: POSIX functions
- From: "Salvatore Benedetto" <emitrax@xxxxxxxxx>
- To: beports@xxxxxxxxxxxxx
- Date: Sun, 31 Aug 2008 12:46:49 +0000
2008/8/29 Andreas Färber <andreas.faerber@xxxxxx>:
> Hi Salvatore,
>
> Am 29.08.2008 um 15:33 schrieb Salvatore Benedetto:
>
>> I was wondering if there is any particular POSIX function you'd like to
>> see
>> implemented in Haiku (beside the rest of XSI IPC) in order to make your
>> porting life easier?
>
> Personally, currently none that I'm aware of.
Ok thanks.
>
> But I recently encountered some problems with pthread_cond_broadcast (no
> ticket yet since I haven't pinpointed it exactly). In a very simple C# Hello
> World app Mono checks for the pthread_cond_broadcast return codes and
> asserts that they are zero (I assume it runs single-threaded, no Garbage
> Collector). If I remove Mono's asserts it works as expected. The problematic
> return code is EINVAL iirc (B_BAD_VALUE), and I traced it to libroot's
> release_sem_etc, triggered by "if (count <= 0 && (flags & B_RELEASE_ALL) ==
> 0) return B_BAD_VALUE;". Unfortunately it's hard to investigate this on the
> Mono side. Does the PosixTestSuite check for such subtleties?
I just ran the posixtestsuit and as far as I can see, there is not such a check.
As far as POSIX standard goes, the only possible return value *seems* to be
- zero on success
- EINVAL on error
which means, that B_BAD_VALUE for instance might not be correct, which
is returned
by cond_signal. Same goes for all the other values returned by release_sem_etc.
Thanks for pointing it out.
Regards,
--
Salvatore Benedetto (a.k.a. emitrax)
Student of Computer Engineer
University of Pisa
www.haiku-os.it
--
HaikuPorts homepage - http://ports.haiku-files.org
List archives: http://www.freelists.org/archives/beports
Administrative contact: brecht@xxxxxxxxxxx
- Follow-Ups:
- [beports] Re: POSIX functions
- From: Andreas Färber
- [beports] Re: POSIX functions
- From: Ingo Weinhold
- References:
- [beports] POSIX functions
- From: Salvatore Benedetto
- [beports] Re: POSIX functions
- From: Andreas Färber
Other related posts:
- » [beports] POSIX functions
- » [beports] Re: POSIX functions
- » [beports] Re: POSIX functions
- » [beports] Re: POSIX functions
- » [beports] Re: POSIX functions
- » [beports] Re: POSIX functions
- » [beports] Re: POSIX functions
- » [beports] Re: POSIX functions
- » [beports] Re: POSIX functions
- » [beports] Re: POSIX functions
- » [beports] Re: POSIX functions
- » [beports] Re: POSIX functions
- » [beports] Re: POSIX functions
- [beports] Re: POSIX functions
- From: Andreas Färber
- [beports] Re: POSIX functions
- From: Ingo Weinhold
- [beports] POSIX functions
- From: Salvatore Benedetto
- [beports] Re: POSIX functions
- From: Andreas Färber