Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: clock_get_time (was: Re: pthread_* functionality currently in OS X)



On Thursday, March 28, 2002, at 03:06 PM, Conrad G T Yoder wrote:
0x10000003

That is a MACH_SEND_INVALID_DEST error. Something tried to send a message to a Mach port which isn't valid.


clock_get_time(mach_port_t clock, mach_timespec_t *cur_time) sends a message to the specified clock object and gets the current time back. Normally, the destination is one of the kernel's clock servers (but it could be anything that accepts these Mach messages). Whoever acquired the send right to the Mach port representing the clock, didn't do it correctly. The call that returns a send right to a clock port is:

mach_port_t clock;
host_get_clock_service(mach_host_self(), REALTIME_CLOCK, &clock);

--Jim

PS: There are better [more efficient] ways to get the current REALTIME_CLOCK time, but I wanted to explain what was happening in this particular case. Anyway, most of those are implemeted in legacy frameworks, and you probably don't want to go dragging any of those in.
_______________________________________________
unix-porting mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/unix-porting
Do not post admin requests to the list. They will be ignored.




References: 
 >clock_get_time (was: Re: pthread_* functionality currently in OS X) (From: Conrad G T Yoder <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.