28 messages in ru.sysoev.nginxRe: buserror on osx.4
FromSent OnAttachments
Franklin KingmaDec 17, 2006 12:35 pm 
Igor SysoevDec 18, 2006 8:02 am 
Franklin KingmaDec 18, 2006 8:13 am 
Igor SysoevDec 18, 2006 8:28 am 
Franklin KingmaDec 18, 2006 8:31 am 
Igor SysoevDec 18, 2006 9:11 am 
Igor SysoevDec 18, 2006 9:20 am 
Franklin KingmaDec 18, 2006 12:21 pm 
Franklin KingmaDec 18, 2006 2:03 pm 
Igor SysoevDec 18, 2006 2:48 pm.txt
Franklin KingmaDec 18, 2006 2:59 pm 
Igor SysoevDec 19, 2006 12:16 am 
Franklin KingmaDec 19, 2006 12:30 am 
Igor SysoevDec 19, 2006 12:37 am 
Igor SysoevDec 19, 2006 12:40 am 
Franklin KingmaDec 19, 2006 12:44 am 
Igor SysoevDec 19, 2006 1:01 am 
Franklin KingmaDec 19, 2006 1:04 am 
Igor SysoevDec 19, 2006 2:31 am 
Franklin KingmaDec 19, 2006 2:40 am 
Igor SysoevDec 19, 2006 1:19 pm 
Franklin KingmaDec 19, 2006 1:33 pm 
Igor SysoevDec 20, 2006 11:04 pm 
Franklin KingmaDec 21, 2006 12:37 am 
Igor SysoevDec 21, 2006 12:46 am 
Igor SysoevDec 21, 2006 12:58 am 
Franklin KingmaDec 21, 2006 1:01 am 
Delta YehDec 21, 2006 1:19 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: buserror on osx.4Actions...
From:Franklin Kingma (fran@public.gmane.org)
Date:Dec 21, 2006 1:01:31 am
List:ru.sysoev.nginx

On Dec 21, 2006, at 9:59 AM, Igor Sysoev wrote:

On Thu, 21 Dec 2006, Igor Sysoev wrote:

(gdb) disassemble ___compare_and_swap32 Dump of assembler code for function ___compare_and_swap32: 0xffff8080 <___compare_and_swap32+0>: lwarx r7,0,r5 0xffff8084 <___compare_and_swap32+4>: cmplw r7,r3 0xffff8088 <___compare_and_swap32+8>: bne- 0xffff809c <___compare_and_swap32+28> 0xffff808c <___compare_and_swap32+12>: stwcx. r4,0,r5 0xffff8090 <___compare_and_swap32+16>: bne- 0xffff8080 <___compare_and_swap32> 0xffff8094 <___compare_and_swap32+20>: li r3,1 0xffff8098 <___compare_and_swap32+24>: blr 0xffff809c <___compare_and_swap32+28>: li r3,0 0xffff80a0 <___compare_and_swap32+32>: blr 0xffff80a4 <___compare_and_swap32+36>: .long 0x0 0xffff80a8 <___compare_and_swap32+40>: .long 0x0 0xffff80ac <___compare_and_swap32+44>: .long 0x0 0xffff80b0 <___compare_and_swap32+48>: .long 0x0 0xffff80b4 <___compare_and_swap32+52>: .long 0x0 0xffff80b8 <___compare_and_swap32+56>: .long 0x0 0xffff80bc <___compare_and_swap32+60>: .long 0x0 End of assembler dump.

OK, then I will do atomic operation using MacOSX builtin OSAtomicCompareAndSwap32Barrier()

Just to be sure that OSAtomicCompareAndSwap32() does not cycle forever (as it may if lwarx/stwcx pair does not work) on your Mac compile this program:

----------- #include <libkern/OSAtomic.h>

static int32_t test;

int main() { int rc;

rc = OSAtomicCompareAndSwap32(0, 1, &test);

printf("rc: %d, test: %d\n", rc, test); }

-----------

using

cc -o q q.c

and run, it should show:

rc: 1, test: 1

pluks:~ franklin$ cc -o q q.c q.c: In function 'main': q.c:11: warning: incompatible implicit declaration of built-in function 'printf' pluks:~ franklin$ ./q rc: 1, test: 1