site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Mail-followup-to: darwin-dev@lists.apple.com User-agent: Mutt/1.5.6+20040907i On 12/20/04 Eric Albert wrote:
On Dec 20, 2004, at 7:26 AM, Paolo Molaro wrote: the best implementation for the specific hardware in use. Short of copying out that code at app launch and using it, you're likely to end
Yes, we jit the code, so we inline the currently used code: unless the implementation changes during runtime (which I guess could be possible, but very unlikely:-) it should be safe.
up with a worse implementation for various systems than the current code. And while copying out that code at app launch may seem tempting, even that is dangerous if the location of __pthread_getspecific changes in the future.
There is no dependency on the current location of __pthread_getspecific (pthread_getspecific is disassembled to get its address, so we don't depend on the name either).
Dump of assembler code for function __pthread_getspecific: 0xffff82c0 <__pthread_getspecific+0>: nop 0xffff82c4 <__pthread_getspecific+4>: .long 0x0 0xffff82c8 <__pthread_getspecific+8>: .long 0x0 0xffff82cc <__pthread_getspecific+12>: .long 0x0 [...]
I'm not sure how you got that output, but here's what I get when I debug Safari on my PowerBook running 10.3.6: [...] 0xffff82c0 in __pthread_getspecific () (gdb) x /6i $pc 0xffff82c0 <__pthread_getspecific>: rlwinm r5,r3,2,0,29
I used the disas command in gdb, which apparently uses another codepath to resolve symbols and their location. Using x/i works for me, too, so mistery solved (though you may want to check with the gdb people if that is the intended behaviour of disas). Thanks. lupus -- ----------------------------------------------------------------- lupus@debian.org debian/rules lupus@ximian.com Monkeys do it better _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com