Skip to content

Instantly share code, notes, and snippets.

@mheffner
Created August 18, 2009 19:41
Show Gist options
  • Save mheffner/169911 to your computer and use it in GitHub Desktop.
Save mheffner/169911 to your computer and use it in GitHub Desktop.
$ gcc -g3 -Wall -fPIC -shared -o condwait_wrap.so condwait_wrap.c -ldl -lpthread
$ gcc -g3 -Wall -o condwait_test condwait_test.c -lpthread
$ LD_PRELOAD=./condwait_wrap.so ./condwait_test
Calling func condwait with cond: 0x600d80, mutex: 0x600dc0.....got it!
Thread exiting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment