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.
This commit is contained in:
parent
4b2734a688
commit
7958c0f19c
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user