This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/9] Add the low level infrastructure for pthreads lockelision with TSX


On 01/22/2013 10:39 PM, Andi Kleen wrote:

+      /* When this could be a nested trylock that is not explicitely
+	 declared an elided lock abort. This makes us follow POSIX
+	 paper semantics. */
+      if (upgraded)
+        _xabort (0xfd);
+
+      if ((status = _xbegin()) == _XBEGIN_STARTED)
+	{
+	  if (*futex == 0)
+	    return 0;
+
+	  /* Lock was busy. Fall back to normal locking.
+	     Could also _xend here but xabort with 0xff code
+	     is more visible in the profiler. */
+	  _xabort (0xff);
+	}

Shouldn't 0xfd, 0xff be #defines or enum constants?


--
Florian Weimer / Red Hat Product Security Team


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]