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
0b1a82aa
Commit
0b1a82aa
authored
Oct 14, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added check for pthread.h (reported by Steven Edwards).
Removed init_done check, the process heap is now created before kernel is loaded anyway.
parent
4034ff36
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
30 deletions
+37
-30
configure
configure
+2
-0
configure.ac
configure.ac
+1
-0
pthread.c
dlls/kernel/pthread.c
+4
-8
config.h.in
include/config.h.in
+3
-0
port.c
libs/wine/port.c
+27
-22
No files found.
configure
View file @
0b1a82aa
...
...
@@ -13874,6 +13874,7 @@ done
for
ac_header
in
\
arpa/inet.h
\
arpa/nameser.h
\
...
...
@@ -13903,6 +13904,7 @@ for ac_header in \
netinet/tcp.h
\
netinet/tcp_fsm.h
\
openssl/ssl.h
\
pthread.h
\
pty.h
\
pwd.h
\
regex.h
\
...
...
configure.ac
View file @
0b1a82aa
...
...
@@ -1020,6 +1020,7 @@ AC_CHECK_HEADERS(\
netinet/tcp.h \
netinet/tcp_fsm.h \
openssl/ssl.h \
pthread.h \
pty.h \
pwd.h \
regex.h \
...
...
dlls/kernel/pthread.c
View file @
0b1a82aa
...
...
@@ -22,6 +22,8 @@
#include "config.h"
#include "wine/port.h"
#ifdef HAVE_PTHREAD_H
#define _GNU_SOURCE
/* we may need to override some GNU extensions */
#include <assert.h>
...
...
@@ -53,8 +55,6 @@ static const struct wine_pthread_functions functions;
DECL_GLOBAL_CONSTRUCTOR
(
pthread_init
)
{
wine_pthread_init_process
(
&
functions
);
}
static
inline
int
init_done
(
void
)
{
return
GetProcessHeap
()
!=
0
;
}
/* NOTE: This is a truly extremely incredibly ugly hack!
* But it does seem to work... */
...
...
@@ -176,7 +176,6 @@ static void mutex_real_init( pthread_mutex_t *mutex )
static
int
wine_pthread_mutex_lock
(
pthread_mutex_t
*
mutex
)
{
if
(
!
init_done
())
return
0
;
if
(
!
((
wine_mutex
)
mutex
)
->
critsect
)
mutex_real_init
(
mutex
);
...
...
@@ -186,7 +185,6 @@ static int wine_pthread_mutex_lock(pthread_mutex_t *mutex)
static
int
wine_pthread_mutex_trylock
(
pthread_mutex_t
*
mutex
)
{
if
(
!
init_done
())
return
0
;
if
(
!
((
wine_mutex
)
mutex
)
->
critsect
)
mutex_real_init
(
mutex
);
...
...
@@ -251,7 +249,6 @@ static int wine_pthread_rwlock_destroy(pthread_rwlock_t *rwlock)
static
int
wine_pthread_rwlock_rdlock
(
pthread_rwlock_t
*
rwlock
)
{
if
(
!
init_done
())
return
0
;
if
(
!
((
wine_rwlock
)
rwlock
)
->
lock
)
rwlock_real_init
(
rwlock
);
...
...
@@ -262,7 +259,6 @@ static int wine_pthread_rwlock_rdlock(pthread_rwlock_t *rwlock)
static
int
wine_pthread_rwlock_tryrdlock
(
pthread_rwlock_t
*
rwlock
)
{
if
(
!
init_done
())
return
0
;
if
(
!
((
wine_rwlock
)
rwlock
)
->
lock
)
rwlock_real_init
(
rwlock
);
...
...
@@ -275,7 +271,6 @@ static int wine_pthread_rwlock_tryrdlock(pthread_rwlock_t *rwlock)
static
int
wine_pthread_rwlock_wrlock
(
pthread_rwlock_t
*
rwlock
)
{
if
(
!
init_done
())
return
0
;
if
(
!
((
wine_rwlock
)
rwlock
)
->
lock
)
rwlock_real_init
(
rwlock
);
...
...
@@ -286,7 +281,6 @@ static int wine_pthread_rwlock_wrlock(pthread_rwlock_t *rwlock)
static
int
wine_pthread_rwlock_trywrlock
(
pthread_rwlock_t
*
rwlock
)
{
if
(
!
init_done
())
return
0
;
if
(
!
((
wine_rwlock
)
rwlock
)
->
lock
)
rwlock_real_init
(
rwlock
);
...
...
@@ -585,3 +579,5 @@ static const struct wine_pthread_functions functions =
wine_pthread_cond_wait
,
/* ptr_pthread_cond_wait */
wine_pthread_cond_timedwait
/* ptr_pthread_cond_timedwait */
};
#endif
/* HAVE_PTHREAD_H */
include/config.h.in
View file @
0b1a82aa
...
...
@@ -395,6 +395,9 @@
/* Define to 1 if you have the `pread' function. */
#undef HAVE_PREAD
/* Define to 1 if you have the <pthread.h> header file. */
#undef HAVE_PTHREAD_H
/* Define to 1 if the system has the type `pthread_rwlockattr_t'. */
#undef HAVE_PTHREAD_RWLOCKATTR_T
...
...
libs/wine/port.c
View file @
0b1a82aa
...
...
@@ -38,9 +38,36 @@
#endif
#include "wine/library.h"
#ifdef HAVE_PTHREAD_H
#include "wine/pthread.h"
/***********************************************************************
* wine_pthread_init_process
*
* This function is just a placeholder, it will be overridden by the pthread support code.
*/
void
wine_pthread_init_process
(
const
struct
wine_pthread_functions
*
functions
)
{
assert
(
0
);
/* we must never get here */
}
/***********************************************************************
* wine_pthread_init_thread
*
* This function is just a placeholder, it will be overridden by the pthread support code.
*/
void
wine_pthread_init_thread
(
void
)
{
assert
(
0
);
/* we must never get here */
}
#endif
/* HAVE_PTHREAD_H */
/***********************************************************************
* wine_switch_to_stack
*
* Switch to the specified stack and call the function.
...
...
@@ -93,28 +120,6 @@ __ASM_GLOBAL_FUNC( wine_switch_to_stack,
#endif
/***********************************************************************
* wine_pthread_init_process
*
* This function is just a placeholder, it will be overridden by the pthread support code.
*/
void
wine_pthread_init_process
(
const
struct
wine_pthread_functions
*
functions
)
{
assert
(
0
);
/* we must never get here */
}
/***********************************************************************
* wine_pthread_init_thread
*
* This function is just a placeholder, it will be overridden by the pthread support code.
*/
void
wine_pthread_init_thread
(
void
)
{
assert
(
0
);
/* we must never get here */
}
#if (defined(__svr4__) || defined(__NetBSD__)) && !defined(MAP_TRYFIXED)
/***********************************************************************
* try_mmap_fixed
...
...
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