summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2003-06-23 09:49:16 +0000
committermarcel <marcel@FreeBSD.org>2003-06-23 09:49:16 +0000
commit7958c0f19c67e4714fb067860498abe52c1100e8 (patch)
tree019b4d93730656bc23e9d33450da24bfec8b7a34
parent4b2734a68886595d830977680706028a43a978d6 (diff)
downloadFreeBSD-src-7958c0f19c67e4714fb067860498abe52c1100e8.zip
FreeBSD-src-7958c0f19c67e4714fb067860498abe52c1100e8.tar.gz
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.
-rw-r--r--lib/libkse/thread/thr_kern.c6
-rw-r--r--lib/libpthread/arch/i386/include/ksd.h8
-rw-r--r--lib/libpthread/thread/thr_kern.c6
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/libkse/thread/thr_kern.c b/lib/libkse/thread/thr_kern.c
index 71957cf..2641890 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 0f39fff..0b38505 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 71957cf..2641890 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
OpenPOWER on IntegriCloud