Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
6f7a2044
Commit
6f7a2044
authored
Apr 01, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added SYSDEPS_GetUnixTid to return the Unix thread id to send to the
server.
parent
b2d39ea5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
1 deletion
+27
-1
configure
configure
+2
-0
configure.ac
configure.ac
+1
-0
config.h.in
include/config.h.in
+3
-0
thread.h
include/thread.h
+1
-0
client.c
scheduler/client.c
+1
-1
sysdeps.c
scheduler/sysdeps.c
+19
-0
No files found.
configure
View file @
6f7a2044
...
...
@@ -13249,8 +13249,10 @@ fi
for
ac_func
in
\
_lwp_create
\
_lwp_self
\
_pclose
\
_popen
\
_snprintf
\
...
...
configure.ac
View file @
6f7a2044
...
...
@@ -943,6 +943,7 @@ dnl **** Check for functions ****
AC_FUNC_ALLOCA()
AC_CHECK_FUNCS(\
_lwp_create \
_lwp_self \
_pclose \
_popen \
_snprintf \
...
...
include/config.h.in
View file @
6f7a2044
...
...
@@ -677,6 +677,9 @@
/* Define to 1 if you have the `_lwp_create' function. */
#undef HAVE__LWP_CREATE
/* Define to 1 if you have the `_lwp_self' function. */
#undef HAVE__LWP_SELF
/* Define to 1 if you have the `_pclose' function. */
#undef HAVE__PCLOSE
...
...
include/thread.h
View file @
6f7a2044
...
...
@@ -147,6 +147,7 @@ extern TEB *THREAD_IdToTEB( DWORD id );
/* scheduler/sysdeps.c */
extern
int
SYSDEPS_SpawnThread
(
TEB
*
teb
);
extern
void
SYSDEPS_SetCurThread
(
TEB
*
teb
);
extern
int
SYSDEPS_GetUnixTid
(
void
);
extern
void
SYSDEPS_InitErrno
(
void
);
extern
void
DECLSPEC_NORETURN
SYSDEPS_ExitThread
(
int
status
);
extern
void
DECLSPEC_NORETURN
SYSDEPS_AbortThread
(
int
status
);
...
...
scheduler/client.c
View file @
6f7a2044
...
...
@@ -694,7 +694,7 @@ void CLIENT_InitThread(void)
SERVER_START_REQ
(
init_thread
)
{
req
->
unix_pid
=
getpid
();
req
->
unix_tid
=
-
1
;
req
->
unix_tid
=
SYSDEPS_GetUnixTid
()
;
req
->
teb
=
teb
;
req
->
entry
=
teb
->
entry_point
;
req
->
reply_fd
=
reply_pipe
[
1
];
...
...
scheduler/sysdeps.c
View file @
6f7a2044
...
...
@@ -317,6 +317,25 @@ void SYSDEPS_AbortThread( int status )
_exit
(
status
);
}
/***********************************************************************
* SYSDEPS_GetUnixTid
*
* Get the Unix tid of the current thread.
*/
int
SYSDEPS_GetUnixTid
(
void
)
{
#ifdef HAVE__LWP_SELF
return
_lwp_self
();
#elif defined(__linux__) && defined(__i386__)
int
ret
;
__asm__
(
"int $0x80"
:
"=a"
(
ret
)
:
"0"
(
224
)
/* SYS_gettid */
);
if
(
ret
<
0
)
ret
=
-
1
;
return
ret
;
#else
return
-
1
;
#endif
}
/* default errno before threading is initialized */
static
int
*
default_errno_location
(
void
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment