Skip to content

Commit

Permalink
2005-01-26 Jakub Jelinek <jakub@redhat.com>
Browse files Browse the repository at this point in the history
	[BZ #737]
	* sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
	Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
	at least gotntpoff relocation and addition.
	* sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
	Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
	Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
	Likewise.
  • Loading branch information
Roland McGrath committed Feb 16, 2005
1 parent 0cbef6c commit cbbe5ab
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
9 changes: 7 additions & 2 deletions nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,14 @@ __new_sem_post:
#endif
addl $_GLOBAL_OFFSET_TABLE_, %ebx
#if USE___THREAD
movl %gs:0, %edx
subl errno@gottpoff(%ebx), %edx
# ifdef NO_TLS_DIRECT_SEG_REFS
movl errno@gotntpoff(%ebx), %edx
addl %gs:0, %edx
movl $EINVAL, (%edx)
# else
movl errno@gotntpoff(%ebx), %edx
movl $EINVAL, %gs:(%edx)
# endif
#else
call __errno_location@plt
movl $EINVAL, (%eax)
Expand Down
9 changes: 7 additions & 2 deletions nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,14 @@ sem_timedwait:
#endif
addl $_GLOBAL_OFFSET_TABLE_, %ebx
#if USE___THREAD
movl %gs:0, %edx
subl errno@gottpoff(%ebx), %edx
# ifdef NO_TLS_DIRECT_SEG_REFS
movl errno@gotntpoff(%ebx), %edx
addl %gs:0, %edx
movl %esi, (%edx)
# else
movl errno@gotntpoff(%ebx), %edx
movl %esi, %gs:(%edx)
# endif
#else
call __errno_location@plt
movl %esi, (%eax)
Expand Down
9 changes: 7 additions & 2 deletions nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,14 @@ __new_sem_trywait:
#endif
addl $_GLOBAL_OFFSET_TABLE_, %ecx
#if USE___THREAD
movl %gs:0, %edx
subl errno@gottpoff(%ecx), %edx
# ifdef NO_TLS_DIRECT_SEG_REFS
movl errno@gotntpoff(%ecx), %edx
addl %gs:0, %edx
movl $EAGAIN, (%edx)
# else
movl errno@gotntpoff(%ecx), %edx
movl $EAGAIN, %gs:(%edx)
# endif
#else
call __errno_location@plt
movl $EAGAIN, (%eax)
Expand Down
9 changes: 7 additions & 2 deletions nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,14 @@ __new_sem_wait:
#endif
addl $_GLOBAL_OFFSET_TABLE_, %ebx
#if USE___THREAD
movl %gs:0, %edx
subl errno@gottpoff(%ebx), %edx
# ifdef NO_TLS_DIRECT_SEG_REFS
movl errno@gotntpoff(%ebx), %edx
addl %gs:0, %edx
movl %esi, (%edx)
# else
movl errno@gotntpoff(%ebx), %edx
movl %esi, %gs:(%edx)
# endif
#else
call __errno_location@plt
movl %esi, (%eax)
Expand Down

0 comments on commit cbbe5ab

Please sign in to comment.