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
cebd60b3
Commit
cebd60b3
authored
Sep 03, 1999
by
Ulrich Weigand
Committed by
Alexandre Julliard
Sep 03, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed global variable pCurrentTeb.
parent
73bd8d2b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
22 deletions
+25
-22
winnt.h
include/winnt.h
+16
-2
sysdeps.c
scheduler/sysdeps.c
+9
-20
No files found.
include/winnt.h
View file @
cebd60b3
...
...
@@ -739,15 +739,29 @@ WINAPI SetUnhandledExceptionFilter( LPTOP_LEVEL_EXCEPTION_FILTER filter );
#define DBG_EXCEPTION_NOT_HANDLED 0x80010001
struct
_TEB
;
#if defined(__i386__) && defined(__WINE__)
#ifdef __WINE__
#if defined(__i386__)
static
inline
struct
_TEB
*
WINE_UNUSED
__get_teb
(
void
)
{
struct
_TEB
*
teb
;
__asm__
(
".byte 0x64
\n\t
movl (0x18),%0"
:
"=r"
(
teb
));
return
teb
;
}
#define NtCurrentTeb() __get_teb()
#elif defined(HAVE__LWP_CREATE)
extern
void
*
_lwp_getprivate
(
void
);
static
inline
struct
_TEB
*
WINE_UNUSED
__get_teb
(
void
)
{
return
(
struct
_TEB
*
)
_lwp_getprivate
();
}
#else
#error NtCurrentTeb() not defined for this architecture!
#endif
#define NtCurrentTeb() __get_teb()
#else
/* __WINE__ */
extern
struct
_TEB
*
WINAPI
NtCurrentTeb
(
void
);
#endif
...
...
scheduler/sysdeps.c
View file @
cebd60b3
...
...
@@ -56,11 +56,6 @@ extern int clone( int (*fn)(void *arg), void *stack, int flags, void *arg );
static
int
init_done
;
#ifndef __i386__
static
TEB
*
pCurrentTeb
;
#endif
#ifndef NO_REENTRANT_LIBC
/***********************************************************************
...
...
@@ -112,13 +107,14 @@ int *__h_errno_location()
*/
void
SYSDEPS_SetCurThread
(
TEB
*
teb
)
{
#if
def __i386__
#if
defined(__i386__)
/* On the i386, the current thread is in the %fs register */
SET_FS
(
teb
->
teb_sel
);
#else
/* FIXME: only works if there is no preemptive task-switching going on... */
pCurrentTeb
=
teb
;
#endif
/* __i386__ */
#elif defined(HAVE__LWP_CREATE)
/* On non-i386 Solaris, we use the LWP private pointer */
_lwp_setprivate
(
teb
);
#endif
init_done
=
1
;
/* now we can use threading routines */
}
...
...
@@ -216,20 +212,13 @@ void SYSDEPS_ExitThread(void)
* This will crash and burn if called before threading is initialized
*/
#ifdef NtCurrentTeb
/* if it was defined as a macro, we need to do some magic */
#ifdef NtCurrentTeb
#undef NtCurrentTeb
struct
_TEB
*
WINAPI
NtCurrentTeb
(
void
)
{
return
__get_teb
();
}
#else
/* NtCurrentTeb */
#endif
struct
_TEB
*
WINAPI
NtCurrentTeb
(
void
)
{
return
pCurrentTeb
;
return
__get_teb
()
;
}
#endif
/* NtCurrentTeb */
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