Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
17ab5875
Commit
17ab5875
authored
Nov 07, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
loader: Use a hidden function instead of an exported global variable to setup pthread functions.
parent
912e4d4d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
4 deletions
+17
-4
kthread.c
loader/kthread.c
+5
-1
main.c
loader/main.c
+1
-1
main.h
loader/main.h
+5
-1
pthread.c
loader/pthread.c
+6
-1
No files found.
loader/kthread.c
View file @
17ab5875
...
...
@@ -324,7 +324,7 @@ static void DECLSPEC_NORETURN abort_thread( long status )
/***********************************************************************
* pthread_functions
*/
const
struct
wine_pthread_functions
pthread_functions
=
static
const
struct
wine_pthread_functions
pthread_functions
=
{
init_process
,
init_thread
,
...
...
@@ -336,6 +336,10 @@ const struct wine_pthread_functions pthread_functions =
sigprocmask
};
void
init_pthread_functions
(
void
)
{
wine_pthread_set_functions
(
&
pthread_functions
,
sizeof
(
pthread_functions
)
);
}
/* Currently this probably works only for glibc2,
* which checks for the presence of double-underscore-prepended
...
...
loader/main.c
View file @
17ab5875
...
...
@@ -106,7 +106,7 @@ int main( int argc, char *argv[] )
reserve_area
(
wine_main_preload_info
[
i
].
addr
,
wine_main_preload_info
[
i
].
size
);
}
wine_pthread_set_functions
(
&
pthread_functions
,
sizeof
(
pthread_functions
)
);
init_pthread_functions
(
);
wine_init
(
argc
,
argv
,
error
,
sizeof
(
error
)
);
fprintf
(
stderr
,
"wine: failed to initialize: %s
\n
"
,
error
);
exit
(
1
);
...
...
loader/main.h
View file @
17ab5875
...
...
@@ -30,6 +30,10 @@ struct wine_preload_info
size_t
size
;
};
extern
const
struct
wine_pthread_functions
pthread_functions
;
#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
extern
void
init_pthread_functions
(
void
)
__attribute__
((
visibility
(
"hidden"
)));
#else
extern
void
init_pthread_functions
(
void
);
#endif
#endif
/* __WINE_LOADER_MAIN_H */
loader/pthread.c
View file @
17ab5875
...
...
@@ -246,7 +246,7 @@ static int pthread_sigmask( int how, const sigset_t *newset, sigset_t *oldset )
/***********************************************************************
* pthread_functions
*/
const
struct
wine_pthread_functions
pthread_functions
=
static
const
struct
wine_pthread_functions
pthread_functions
=
{
init_process
,
init_thread
,
...
...
@@ -257,3 +257,8 @@ const struct wine_pthread_functions pthread_functions =
abort_thread
,
pthread_sigmask
};
void
init_pthread_functions
(
void
)
{
wine_pthread_set_functions
(
&
pthread_functions
,
sizeof
(
pthread_functions
)
);
}
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