Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #1008 (assigned defect)

Opened 5 months ago

Last modified 2 months ago

neither mac os 10.4 nor 10.5 implement sem_timedwait

Reported by: fawzi Assigned to: sean (accepted)
Priority: major Milestone: 0.99.8
Component: Core Functionality Version: trunk
Keywords: semaphores darwin triage Cc: fawzi@gmx.ch

Description

actual mac os systems do no implement sem_timedwait. The following patch replaces the external reference with a function that stops

 }
 else version( darwin )
 {
-    int sem_timedwait(sem_t*, timespec*);
+    int sem_timedwait(sem_t*, timespec*) {
+        assert(0);
+    };
 }
 else version( freebsd )
 {

Change History

04/16/08 05:46:17 changed by fawzi

Another related problem with semaphore.d on macintosh connected with the partial implementation of semaphore by the OS is that sem_init does not work, only sem_open can be used.

Probably the cleanest thing to do on darwin would be to implement semaphore directly on the top of match ports on darwin.

Semaphores on darwin are also implemented on the top of them but because of mismatches of the interface they are badly and only partially implemented.

If I have some spare time I will try to look into it.

Fawzi

04/16/08 13:06:12 changed by sean

  • status changed from new to assigned.

If it helps, what we've done thus far for darwin support gaps is to define the functions internally within the runtime. I don't know if the interface will allow it in this case, but you can see what I'm talking about here:

http://dsource.org/projects/tango/browser/trunk/lib/common/tango/stdc/posix/pthread_darwin.d

It would be great if we could add a semaphore_darwin.d that takes care of timedwait and such as well. Well, maybe not great, but it'd do ;)

04/27/08 05:11:37 changed by larsivi

  • milestone changed from 0.99.6 to 0.99.7.

05/24/08 05:56:10 changed by larsivi

  • keywords changed from semaphors darwin to semaphores darwin triage.

07/10/08 07:01:45 changed by larsivi

  • milestone changed from 0.99.7 to 0.99.8.