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
b59bf98b
Commit
b59bf98b
authored
Mar 26, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved errno_location support to sysdeps.c.
parent
9037f4bb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
61 deletions
+66
-61
thread.h
include/thread.h
+1
-0
errno.c
libs/wine/errno.c
+0
-39
sysdeps.c
scheduler/sysdeps.c
+64
-0
thread.c
scheduler/thread.c
+1
-22
No files found.
include/thread.h
View file @
b59bf98b
...
@@ -147,6 +147,7 @@ extern TEB *THREAD_IdToTEB( DWORD id );
...
@@ -147,6 +147,7 @@ extern TEB *THREAD_IdToTEB( DWORD id );
/* scheduler/sysdeps.c */
/* scheduler/sysdeps.c */
extern
int
SYSDEPS_SpawnThread
(
TEB
*
teb
);
extern
int
SYSDEPS_SpawnThread
(
TEB
*
teb
);
extern
void
SYSDEPS_SetCurThread
(
TEB
*
teb
);
extern
void
SYSDEPS_SetCurThread
(
TEB
*
teb
);
extern
void
SYSDEPS_InitErrno
(
void
);
extern
void
DECLSPEC_NORETURN
SYSDEPS_ExitThread
(
int
status
);
extern
void
DECLSPEC_NORETURN
SYSDEPS_ExitThread
(
int
status
);
extern
void
DECLSPEC_NORETURN
SYSDEPS_AbortThread
(
int
status
);
extern
void
DECLSPEC_NORETURN
SYSDEPS_AbortThread
(
int
status
);
extern
void
DECLSPEC_NORETURN
SYSDEPS_SwitchToThreadStack
(
void
(
*
func
)(
void
)
);
extern
void
DECLSPEC_NORETURN
SYSDEPS_SwitchToThreadStack
(
void
(
*
func
)(
void
)
);
...
...
libs/wine/errno.c
View file @
b59bf98b
...
@@ -22,45 +22,6 @@
...
@@ -22,45 +22,6 @@
#include <assert.h>
#include <assert.h>
/* default errno before threading is initialized */
static
int
*
default_errno_location
(
void
)
{
static
int
errno
;
return
&
errno
;
}
/* default h_errno before threading is initialized */
static
int
*
default_h_errno_location
(
void
)
{
static
int
h_errno
;
return
&
h_errno
;
}
int
*
(
*
wine_errno_location
)(
void
)
=
default_errno_location
;
int
*
(
*
wine_h_errno_location
)(
void
)
=
default_h_errno_location
;
/***********************************************************************
* __errno_location/__error/___errno
*
* Get the per-thread errno location.
*/
#ifdef ERRNO_LOCATION
int
*
ERRNO_LOCATION
(
void
)
{
return
wine_errno_location
();
}
#endif
/* ERRNO_LOCATION */
/***********************************************************************
* __h_errno_location
*
* Get the per-thread h_errno location.
*/
int
*
__h_errno_location
(
void
)
{
return
wine_h_errno_location
();
}
/***********************************************************************
/***********************************************************************
* pthread functions
* pthread functions
*/
*/
...
...
scheduler/sysdeps.c
View file @
b59bf98b
...
@@ -318,6 +318,70 @@ void SYSDEPS_AbortThread( int status )
...
@@ -318,6 +318,70 @@ void SYSDEPS_AbortThread( int status )
}
}
/* default errno before threading is initialized */
static
int
*
default_errno_location
(
void
)
{
static
int
errno
;
return
&
errno
;
}
/* default h_errno before threading is initialized */
static
int
*
default_h_errno_location
(
void
)
{
static
int
h_errno
;
return
&
h_errno
;
}
/* errno once threading is working */
static
int
*
thread_errno_location
(
void
)
{
return
&
NtCurrentTeb
()
->
thread_errno
;
}
/* h_errno once threading is working */
static
int
*
thread_h_errno_location
(
void
)
{
return
&
NtCurrentTeb
()
->
thread_h_errno
;
}
static
int
*
(
*
errno_location_ptr
)(
void
)
=
default_errno_location
;
static
int
*
(
*
h_errno_location_ptr
)(
void
)
=
default_h_errno_location
;
/***********************************************************************
* __errno_location/__error/___errno
*
* Get the per-thread errno location.
*/
#ifdef ERRNO_LOCATION
int
*
ERRNO_LOCATION
(
void
)
{
return
errno_location_ptr
();
}
#endif
/* ERRNO_LOCATION */
/***********************************************************************
* __h_errno_location
*
* Get the per-thread h_errno location.
*/
int
*
__h_errno_location
(
void
)
{
return
h_errno_location_ptr
();
}
/***********************************************************************
* SYSDEPS_InitErrno
*
* Initialize errno handling.
*/
void
SYSDEPS_InitErrno
(
void
)
{
errno_location_ptr
=
thread_errno_location
;
h_errno_location_ptr
=
thread_h_errno_location
;
}
/**********************************************************************
/**********************************************************************
* NtCurrentTeb (NTDLL.@)
* NtCurrentTeb (NTDLL.@)
*
*
...
...
scheduler/thread.c
View file @
b59bf98b
...
@@ -211,26 +211,6 @@ error:
...
@@ -211,26 +211,6 @@ error:
/***********************************************************************
/***********************************************************************
* thread_errno_location
*
* Get the per-thread errno location.
*/
static
int
*
thread_errno_location
(
void
)
{
return
&
NtCurrentTeb
()
->
thread_errno
;
}
/***********************************************************************
* thread_h_errno_location
*
* Get the per-thread h_errno location.
*/
static
int
*
thread_h_errno_location
(
void
)
{
return
&
NtCurrentTeb
()
->
thread_h_errno
;
}
/***********************************************************************
* THREAD_Init
* THREAD_Init
*
*
* Setup the initial thread.
* Setup the initial thread.
...
@@ -245,8 +225,7 @@ void THREAD_Init(void)
...
@@ -245,8 +225,7 @@ void THREAD_Init(void)
assert
(
initial_teb
.
teb_sel
);
assert
(
initial_teb
.
teb_sel
);
initial_teb
.
process
=
&
current_process
;
initial_teb
.
process
=
&
current_process
;
SYSDEPS_SetCurThread
(
&
initial_teb
);
SYSDEPS_SetCurThread
(
&
initial_teb
);
wine_errno_location
=
thread_errno_location
;
SYSDEPS_InitErrno
();
wine_h_errno_location
=
thread_h_errno_location
;
}
}
}
}
...
...
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