Subversion Repositories HelenOS

Rev

Rev 2071 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2071 Rev 4402
Line 40... Line 40...
40
	pushl %ebx
40
	pushl %ebx
41
	
41
	
42
	movl 12(%esp),%ebx
42
	movl 12(%esp),%ebx
43
 
43
 
44
0:	
44
0:	
45
	#ifdef CONFIG_HT
-
 
46
	pause			# Pentium 4's with HT love this instruction
45
	pause			# Pentium 4's with HT love this instruction
47
	#endif
-
 
48
	movl (%ebx),%eax
46
	movl (%ebx),%eax
49
	testl %eax,%eax
47
	testl %eax,%eax
50
	jnz 0b			# lightweight looping while it is locked
48
	jnz 0b			# lightweight looping while it is locked
51
	incl %eax
49
	incl %eax
52
	xchgl %eax,(%ebx)	# now use the atomic operation
50
	xchgl %eax,(%ebx)	# now use the atomic operation