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
dd0340ef
Commit
dd0340ef
authored
Aug 15, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
loader/kthread: Remove some unneeded #ifdefs, other platforms use pthread now.
parent
bdeeabeb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
76 deletions
+0
-76
configure
configure
+0
-4
configure.ac
configure.ac
+0
-2
config.h.in
include/config.h.in
+0
-6
kthread.c
loader/kthread.c
+0
-64
No files found.
configure
View file @
dd0340ef
...
...
@@ -18346,11 +18346,7 @@ fi
for
ac_func
in
\
_lwp_create
\
_lwp_self
\
_pclose
\
_popen
\
_snprintf
\
...
...
configure.ac
View file @
dd0340ef
...
...
@@ -1239,8 +1239,6 @@ fi
dnl **** Check for functions ****
AC_CHECK_FUNCS(\
_lwp_create \
_lwp_self \
_pclose \
_popen \
_snprintf \
...
...
include/config.h.in
View file @
dd0340ef
...
...
@@ -932,12 +932,6 @@
/* Define if Xrender has the XRenderSetPictureTransform function */
#undef HAVE_XRENDERSETPICTURETRANSFORM
/* 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
...
...
loader/kthread.c
View file @
dd0340ef
...
...
@@ -58,12 +58,6 @@ struct _pthread_cleanup_buffer;
#ifdef HAVE_SYS_SYSCALL_H
# include <sys/syscall.h>
#endif
#ifdef HAVE_SYS_LWP_H
# include <sys/lwp.h>
#endif
#ifdef HAVE_UCONTEXT_H
# include <ucontext.h>
#endif
#ifdef HAVE_SCHED_H
#include <sched.h>
#endif
...
...
@@ -192,9 +186,6 @@ static void cleanup_thread( void *ptr )
wine_ldt_free_fs
(
info
.
teb_sel
);
if
(
info
.
stack_size
)
munmap
(
info
.
stack_base
,
info
.
stack_size
);
if
(
info
.
teb_size
)
munmap
(
info
.
teb_base
,
info
.
teb_size
);
#ifdef HAVE__LWP_CREATE
_lwp_exit
();
#endif
_exit
(
info
.
exit_status
);
}
...
...
@@ -276,15 +267,6 @@ static int create_thread( struct wine_pthread_thread_info *info )
:
"eax"
,
"edx"
);
return
0
;
}
#elif defined(HAVE__LWP_CREATE)
{
ucontext_t
context
;
_lwp_makecontext
(
&
context
,
(
void
(
*
)(
void
*
))
info
->
entry
,
info
,
NULL
,
info
->
stack_base
,
info
->
stack_size
);
if
(
_lwp_create
(
&
context
,
0
,
NULL
)
)
return
-
1
;
return
0
;
}
#endif
return
-
1
;
}
...
...
@@ -297,7 +279,6 @@ static int create_thread( struct wine_pthread_thread_info *info )
*/
static
void
init_current_teb
(
struct
wine_pthread_thread_info
*
info
)
{
#ifdef __i386__
/* On the i386, the current thread is in the %fs register */
LDT_ENTRY
fs_entry
;
...
...
@@ -305,30 +286,10 @@ static void init_current_teb( struct wine_pthread_thread_info *info )
wine_ldt_set_limit
(
&
fs_entry
,
info
->
teb_size
-
1
);
wine_ldt_set_flags
(
&
fs_entry
,
WINE_LDT_FLAGS_DATA
|
WINE_LDT_FLAGS_32BIT
);
wine_ldt_init_fs
(
info
->
teb_sel
,
&
fs_entry
);
#elif defined(HAVE__LWP_CREATE)
/* On non-i386 Solaris, we use the LWP private pointer */
_lwp_setprivate
(
info
->
teb_base
);
#elif defined(__powerpc__)
/* On PowerPC, the current TEB is in the gpr13 register */
# ifdef __APPLE__
__asm__
__volatile__
(
"mr r13, %0"
:
:
"r"
(
info
->
teb_base
));
# else
__asm__
__volatile__
(
"mr 2, %0"
:
:
"r"
(
info
->
teb_base
));
# endif
#elif defined(__ALPHA__)
/* FIXME: On Alpha, the current TEB is not accessible to user-space */
/* __asm__ __volatile__();*/
#else
# error You must implement init_current_teb for your platform
#endif
/* set pid and tid */
info
->
pid
=
getpid
();
#ifdef HAVE__LWP_SELF
info
->
tid
=
_lwp_self
();
#else
info
->
tid
=
-
1
;
#endif
}
...
...
@@ -338,29 +299,7 @@ static void init_current_teb( struct wine_pthread_thread_info *info )
static
void
*
get_current_teb
(
void
)
{
void
*
ret
;
#ifdef __i386__
__asm__
(
".byte 0x64
\n\t
movl 0x18,%0"
:
"=r"
(
ret
)
);
#elif defined(HAVE__LWP_CREATE)
ret
=
_lwp_getprivate
();
#elif defined(__powerpc__)
# ifdef __APPLE__
__asm__
(
"mr %0,r13"
:
"=r"
(
ret
)
);
# else
__asm__
(
"mr %0,2"
:
"=r"
(
ret
)
);
# endif
#elif defined(__ALPHA__)
/* 0x00ab is the PAL opcode for rdteb */
__asm__
(
"lda $30,8($30)
\n\t
"
"stq $0,0($30)
\n\t
"
"call_pal 0x00ab
\n\t
"
"mov $0,%0
\n\t
"
"ldq $0,0($30)
\n\t
"
"lda $30,-8($30)"
:
"=r"
(
ret
)
);
#else
# error get_current_teb not defined for this architecture
#endif
/* __i386__ */
return
ret
;
}
...
...
@@ -379,9 +318,6 @@ static void DECLSPEC_NORETURN exit_thread( struct wine_pthread_thread_info *info
*/
static
void
DECLSPEC_NORETURN
abort_thread
(
long
status
)
{
#ifdef HAVE__LWP_CREATE
_lwp_exit
();
#endif
_exit
(
status
);
}
...
...
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