This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Accessing another thread's errno
- From: "Jim Clause" <clause at cc dot gatech dot edu>
- To: libc-alpha at sourceware dot org
- Date: Tue, 8 Aug 2006 16:58:42 -0400
- Subject: Accessing another thread's errno
- Reply-to: clause at cc dot gatech dot edu
Hello,
Is there a way to set the errno variable of a different thread?
I'm trying to use the Intel Pin instrumentation framework to return
canned values for some system calls. The problem is that the
instrumentation engine runs in a separate thread so I am unable to
access the errno variable of the program thread.
I am able to access the contents of the registers and I've tried to
set %esp and then call __errno_location (this is on ia32) but haven't
had any luck using that approach.
Any pointers on how to accomplish this would be greatly appreciated.
Thanks,
~Jim