From 7958c0f19c67e4714fb067860498abe52c1100e8 Mon Sep 17 00:00:00 2001 From: marcel Date: Mon, 23 Jun 2003 09:49:16 +0000 Subject: [PATCH] Change the definition of _ksd_curkse, _ksd_curthread and _ksd_readandclear_tmbx to be function-like. That way we can define them as inline functions or create prototypes for them. This change allows the ksd interface on ia64 to be fully inlined. --- lib/libkse/thread/thr_kern.c | 6 +++--- lib/libpthread/arch/i386/include/ksd.h | 8 ++++---- lib/libpthread/thread/thr_kern.c | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/libkse/thread/thr_kern.c b/lib/libkse/thread/thr_kern.c index 71957cfec78a..2641890a747a 100644 --- a/lib/libkse/thread/thr_kern.c +++ b/lib/libkse/thread/thr_kern.c @@ -478,7 +478,7 @@ _kse_critical_enter(void) { kse_critical_t crit; - crit = _ksd_readandclear_tmbx; + crit = _ksd_readandclear_tmbx(); return (crit); } @@ -1815,14 +1815,14 @@ kse_wakeup_multi(struct kse *curkse) struct pthread * _get_curthread(void) { - return (_ksd_curthread); + return (_ksd_curthread()); } /* This assumes the caller has disabled upcalls. */ struct kse * _get_curkse(void) { - return (_ksd_curkse); + return (_ksd_curkse()); } void diff --git a/lib/libpthread/arch/i386/include/ksd.h b/lib/libpthread/arch/i386/include/ksd.h index 0f39fffc41ae..0b38505e82a3 100644 --- a/lib/libpthread/arch/i386/include/ksd.h +++ b/lib/libpthread/arch/i386/include/ksd.h @@ -132,11 +132,11 @@ __ksd_readandclear32(volatile u_long *addr) #define KSD_SET_PTR(member, val) __KSD_SET32(k_ ## member, val) #define KSD_READANDCLEAR_PTR(member) __KSD_READANDCLEAR32(k_ ## member) -#define _ksd_curkse ((struct kse *)KSD_GET_PTR(mbx.km_udata)) -#define _ksd_curthread KSD_GET_PTR(curthread) +#define _ksd_curkse() ((struct kse *)KSD_GET_PTR(mbx.km_udata)) +#define _ksd_curthread() KSD_GET_PTR(curthread) #define _ksd_set_tmbx(value) KSD_SET_PTR(mbx.km_curthread, (void *)value) -#define _ksd_get_tmbx(value) KSD_GET_PTR(mbx.km_curthread) -#define _ksd_readandclear_tmbx KSD_READANDCLEAR_PTR(mbx.km_curthread) +#define _ksd_get_tmbx() KSD_GET_PTR(mbx.km_curthread) +#define _ksd_readandclear_tmbx() KSD_READANDCLEAR_PTR(mbx.km_curthread) int _ksd_create(struct ksd *ksd, void *base, int size); void _ksd_destroy(struct ksd *ksd); diff --git a/lib/libpthread/thread/thr_kern.c b/lib/libpthread/thread/thr_kern.c index 71957cfec78a..2641890a747a 100644 --- a/lib/libpthread/thread/thr_kern.c +++ b/lib/libpthread/thread/thr_kern.c @@ -478,7 +478,7 @@ _kse_critical_enter(void) { kse_critical_t crit; - crit = _ksd_readandclear_tmbx; + crit = _ksd_readandclear_tmbx(); return (crit); } @@ -1815,14 +1815,14 @@ kse_wakeup_multi(struct kse *curkse) struct pthread * _get_curthread(void) { - return (_ksd_curthread); + return (_ksd_curthread()); } /* This assumes the caller has disabled upcalls. */ struct kse * _get_curkse(void) { - return (_ksd_curkse); + return (_ksd_curkse()); } void