Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 155494 Details for
Bug 241467
more futex support needed
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch adding support for modern futex features
d-strace-futex (text/plain), 3.82 KB, created by
Ulrich Drepper
on 2007-05-26 04:55:08 UTC
(
hide
)
Description:
Patch adding support for modern futex features
Filename:
MIME Type:
Creator:
Ulrich Drepper
Created:
2007-05-26 04:55:08 UTC
Size:
3.82 KB
patch
obsolete
>--- process.c-save 2007-05-25 18:55:05.000000000 -0700 >+++ process.c 2007-05-25 19:42:08.000000000 -0700 >@@ -3067,27 +3067,104 @@ > #endif /* !SVR4 */ > > #ifdef LINUX >+# ifndef FUTEX_CMP_REQUEUE >+# define FUTEX_CMP_REQUEUE 4 >+# endif >+# ifndef FUTEX_WAKE_OP >+# define FUTEX_WAKE_OP 5 >+# endif >+# ifndef FUTEX_LOCK_PI >+# define FUTEX_LOCK_PI 6 >+# define FUTEX_UNLOCK_PI 7 >+# define FUTEX_TRYLOCK_PI 8 >+# endif >+# ifndef FUTEX_CMP_REQUEUE_PI >+# define FUTEX_CMP_REQUEUE_PI 9 >+# endif >+# ifndef FUTEX_PRIVATE_FLAG >+# define FUTEX_PRIVATE_FLAG 128 >+# endif > static const struct xlat futexops[] = { >- { FUTEX_WAIT, "FUTEX_WAIT" }, >- { FUTEX_WAKE, "FUTEX_WAKE" }, >- { FUTEX_FD, "FUTEX_FD" }, >- { FUTEX_REQUEUE,"FUTEX_REQUEUE" }, >- { 0, NULL } >+ { FUTEX_WAIT, "FUTEX_WAIT" }, >+ { FUTEX_WAKE, "FUTEX_WAKE" }, >+ { FUTEX_FD, "FUTEX_FD" }, >+ { FUTEX_REQUEUE, "FUTEX_REQUEUE" }, >+ { FUTEX_CMP_REQUEUE, "FUTEX_CMP_REQUEUE" }, >+ { FUTEX_WAKE_OP, "FUTEX_WAKE_OP" }, >+ { FUTEX_LOCK_PI, "FUTEX_LOCK_PI" }, >+ { FUTEX_UNLOCK_PI, "FUTEX_UNLOCK_PI" }, >+ { FUTEX_TRYLOCK_PI, "FUTEX_TRYLOCK_PI" }, >+ { FUTEX_CMP_REQUEUE_PI, "FUTEX_CMP_REQUEUE_PI" }, >+ { FUTEX_WAIT|FUTEX_PRIVATE_FLAG, "FUTEX_WAIT_PRIVATE" }, >+ { FUTEX_WAKE|FUTEX_PRIVATE_FLAG, "FUTEX_WAKE_PRIVATE" }, >+ { FUTEX_FD|FUTEX_PRIVATE_FLAG, "FUTEX_FD_PRIVATE" }, >+ { FUTEX_REQUEUE|FUTEX_PRIVATE_FLAG, "FUTEX_REQUEUE_PRIVATE" }, >+ { FUTEX_CMP_REQUEUE|FUTEX_PRIVATE_FLAG, "FUTEX_CMP_REQUEUE_PRIVATE" }, >+ { FUTEX_WAKE_OP|FUTEX_PRIVATE_FLAG, "FUTEX_WAKE_OP_PRIVATE" }, >+ { FUTEX_LOCK_PI|FUTEX_PRIVATE_FLAG, "FUTEX_LOCK_PI_PRIVATE" }, >+ { FUTEX_UNLOCK_PI|FUTEX_PRIVATE_FLAG, "FUTEX_UNLOCK_PI_PRIVATE" }, >+ { FUTEX_TRYLOCK_PI|FUTEX_PRIVATE_FLAG, "FUTEX_TRYLOCK_PI_PRIVATE" }, >+ { FUTEX_CMP_REQUEUE_PI|FUTEX_PRIVATE_FLAG, "FUTEX_CMP_REQUEUE_PI_PRIVATE" }, >+ { 0, NULL } >+}; >+#ifndef FUTEX_OP_SET >+# define FUTEX_OP_SET 0 >+# define FUTEX_OP_ADD 1 >+# define FUTEX_OP_OR 2 >+# define FUTEX_OP_ANDN 3 >+# define FUTEX_OP_XOR 4 >+# define FUTEX_OP_CMP_EQ 0 >+# define FUTEX_OP_CMP_NE 1 >+# define FUTEX_OP_CMP_LT 2 >+# define FUTEX_OP_CMP_LE 3 >+# define FUTEX_OP_CMP_GT 4 >+# define FUTEX_OP_CMP_GE 5 >+#endif >+static const struct xlat futexwakeops[] = { >+ { FUTEX_OP_SET, "FUTEX_OP_SET" }, >+ { FUTEX_OP_ADD, "FUTEX_OP_ADD" }, >+ { FUTEX_OP_OR, "FUTEX_OP_OR" }, >+ { FUTEX_OP_ANDN, "FUTEX_OP_ANDN" }, >+ { FUTEX_OP_XOR, "FUTEX_OP_XOR" }, >+ { 0, NULL } > }; >+static const struct xlat futexwakecmps[] = { >+ { FUTEX_OP_CMP_EQ, "FUTEX_OP_CMP_EQ" }, >+ { FUTEX_OP_CMP_NE, "FUTEX_OP_CMP_NE" }, >+ { FUTEX_OP_CMP_LT, "FUTEX_OP_CMP_LT" }, >+ { FUTEX_OP_CMP_LE, "FUTEX_OP_CMP_LE" }, >+ { FUTEX_OP_CMP_GT, "FUTEX_OP_CMP_GT" }, >+ { FUTEX_OP_CMP_GE, "FUTEX_OP_CMP_GE" }, >+ { 0, NULL } >+}; > > int > sys_futex(tcp) > struct tcb *tcp; > { > if (entering(tcp)) { >+ long int cmd = tcp->u_arg[1] & ~FUTEX_PRIVATE_FLAG; > tprintf("%p, ", (void *) tcp->u_arg[0]); > printxval(futexops, tcp->u_arg[1], "FUTEX_???"); > tprintf(", %ld", tcp->u_arg[2]); >- if (tcp->u_arg[1] == FUTEX_WAIT) { >+ if (cmd == FUTEX_WAIT) { > tprintf(", "); > printtv(tcp, tcp->u_arg[3]); >- } else if (tcp->u_arg[1] == FUTEX_REQUEUE) >+ } else if (cmd == FUTEX_REQUEUE) > tprintf(", %ld, %p", tcp->u_arg[3], (void *) tcp->u_arg[4]); >+ else if (cmd == FUTEX_CMP_REQUEUE) >+ tprintf(", %ld, %p, %ld", tcp->u_arg[3], (void *) tcp->u_arg[4], tcp->u_arg[5]); >+ else if (cmd == FUTEX_WAKE_OP) { >+ tprintf(", %ld, %p, {", tcp->u_arg[3], (void *) tcp->u_arg[4]); >+ if ((tcp->u_arg[5] >> 28) & 8) >+ tprintf("FUTEX_OP_OPARG_SHIFT|"); >+ printxval(futexwakeops, (tcp->u_arg[5] >> 28) & 0x7, "FUTEX_OP_???"); >+ tprintf(", %ld, ", (tcp->u_arg[5] >> 12) & 0xfff); >+ if ((tcp->u_arg[5] >> 24) & 8) >+ tprintf("FUTEX_OP_OPARG_SHIFT|"); >+ printxval(futexwakecmps, (tcp->u_arg[5] >> 24) & 0x7, "FUTEX_OP_CMP_???"); >+ tprintf(", %ld}", tcp->u_arg[5] & 0xfff); >+ } > } > return 0; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 241467
: 155494