mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-04 15:40:44 +00:00
Define THR_GETCONTEXT and THR_SETCONTEXT in terms of the userland
context functions. We don't need to enter the kernel anymore. The contexts are compatible (ie a context created by getcontext() can be restored by _ia64_restore_context()). While here, make the use of THR_ALIGNBYTES and THR_ALIGN a no-op. They are going to be removed anyway.
This commit is contained in:
parent
503148a20c
commit
9a3ea63e79
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118507
|
@ -29,11 +29,12 @@
|
|||
#ifndef _PTHREAD_MD_H_
|
||||
#define _PTHREAD_MD_H_
|
||||
|
||||
#define THR_GETCONTEXT(ucp) getcontext(ucp)
|
||||
#define THR_SETCONTEXT(ucp) setcontext(ucp)
|
||||
#define THR_GETCONTEXT(ucp) _ia64_save_context(&(ucp)->uc_mcontext)
|
||||
#define THR_SETCONTEXT(ucp) _ia64_restore_context(&(ucp)->uc_mcontext, \
|
||||
0, NULL)
|
||||
|
||||
#define THR_ALIGNBYTES 15
|
||||
#define THR_ALIGN(td) (((uintptr_t)(td) + THR_ALIGNBYTES) & ~THR_ALIGNBYTES)
|
||||
#define THR_ALIGNBYTES 0
|
||||
#define THR_ALIGN(td) (td)
|
||||
|
||||
/* KSE Specific Data. */
|
||||
struct ksd {
|
||||
|
|
|
@ -29,11 +29,12 @@
|
|||
#ifndef _PTHREAD_MD_H_
|
||||
#define _PTHREAD_MD_H_
|
||||
|
||||
#define THR_GETCONTEXT(ucp) getcontext(ucp)
|
||||
#define THR_SETCONTEXT(ucp) setcontext(ucp)
|
||||
#define THR_GETCONTEXT(ucp) _ia64_save_context(&(ucp)->uc_mcontext)
|
||||
#define THR_SETCONTEXT(ucp) _ia64_restore_context(&(ucp)->uc_mcontext, \
|
||||
0, NULL)
|
||||
|
||||
#define THR_ALIGNBYTES 15
|
||||
#define THR_ALIGN(td) (((uintptr_t)(td) + THR_ALIGNBYTES) & ~THR_ALIGNBYTES)
|
||||
#define THR_ALIGNBYTES 0
|
||||
#define THR_ALIGN(td) (td)
|
||||
|
||||
/* KSE Specific Data. */
|
||||
struct ksd {
|
||||
|
|
Loading…
Reference in a new issue