diff options
author | marcus <marcus> | 2004-08-03 11:48:56 +0000 |
---|---|---|
committer | marcus <marcus> | 2004-08-03 11:48:56 +0000 |
commit | 0838e7fcbd6d4662ecf50f7b1e9224159e448371 (patch) | |
tree | 13be6c6a2240109d5a1fddd5def6d4ccb6535966 | |
parent | ec7d734f5df8fab4477d863f944d2083b188dff3 (diff) |
2004-08-02 Peter Bruin <pjbruin@dds.nl>
* powerpc/l4/bits/vregs.h (_L4_my_local_id): Remove variable
ID, and return the desired value directly.
(_L4_my_global_id): Likewise.
(_L4_pager): Remove variable THREAD, and return the desired value
directly.
(_L4_exception_handler): Likewise.
(_L4_intended_receiver): Likewise.
(_L4_actual_sender): Likewise.
(_L4_set_pager): Use `thread' instead of `thread.raw'.
(_L4_set_exception_handler): Likewise.
(_L4_set_virtual_sender): Likewise.
(_L4_xfer_timeout): Rename function to _L4_xfer_timeouts.
(_L4_set_xfer_timeout): Rename function to _L4_set_xfer_timeouts.
* powerpc/l4/bits/syscall.h (_L4_kernel_interface): Change return
type to _L4_kip_t.
(_L4_memory_control): Change return type to _L4_word_t. Rename
variable CTRL to CTRL_RESULT and use it to hold the return value
of the system call.
* l4/compat/thread.h (L4_Set_XferTimeouts): Do not return a value.
* l4/gnu/thread.h (l4_set_xfer_timeouts): Likewise.
-rw-r--r-- | libl4/ChangeLog | 25 | ||||
-rw-r--r-- | libl4/l4/compat/thread.h | 2 | ||||
-rw-r--r-- | libl4/powerpc/l4/bits/syscall.h | 12 | ||||
-rw-r--r-- | libl4/powerpc/l4/bits/vregs.h | 36 |
4 files changed, 44 insertions, 31 deletions
diff --git a/libl4/ChangeLog b/libl4/ChangeLog index 7de4a2a..1825279 100644 --- a/libl4/ChangeLog +++ b/libl4/ChangeLog @@ -1,5 +1,30 @@ 2004-08-02 Peter Bruin <pjbruin@dds.nl> + * powerpc/l4/bits/vregs.h (_L4_my_local_id): Remove variable + ID, and return the desired value directly. + (_L4_my_global_id): Likewise. + (_L4_pager): Remove variable THREAD, and return the desired value + directly. + (_L4_exception_handler): Likewise. + (_L4_intended_receiver): Likewise. + (_L4_actual_sender): Likewise. + (_L4_set_pager): Use `thread' instead of `thread.raw'. + (_L4_set_exception_handler): Likewise. + (_L4_set_virtual_sender): Likewise. + (_L4_xfer_timeout): Rename function to _L4_xfer_timeouts. + (_L4_set_xfer_timeout): Rename function to _L4_set_xfer_timeouts. + + * powerpc/l4/bits/syscall.h (_L4_kernel_interface): Change return + type to _L4_kip_t. + (_L4_memory_control): Change return type to _L4_word_t. Rename + variable CTRL to CTRL_RESULT and use it to hold the return value + of the system call. + + * l4/compat/thread.h (L4_Set_XferTimeouts): Do not return a value. + * l4/gnu/thread.h (l4_set_xfer_timeouts): Likewise. + +2004-08-02 Peter Bruin <pjbruin@dds.nl> + * powerpc/l4/bits/math.h (__L4_msb): Count leading zeros of `data' instead of `data & -data'. (__L4_lsb): Call __L4_msb instead of __l4_msb. Remove unused diff --git a/libl4/l4/compat/thread.h b/libl4/l4/compat/thread.h index 7c2cf14..f34bf99 100644 --- a/libl4/l4/compat/thread.h +++ b/libl4/l4/compat/thread.h @@ -287,7 +287,7 @@ static inline void _L4_attribute_always_inline L4_Set_XferTimeouts (L4_Word_t NewValue) { - return _L4_set_xfer_timeouts (NewValue); + _L4_set_xfer_timeouts (NewValue); } diff --git a/libl4/powerpc/l4/bits/syscall.h b/libl4/powerpc/l4/bits/syscall.h index 4c74adf..8ad86b1 100644 --- a/libl4/powerpc/l4/bits/syscall.h +++ b/libl4/powerpc/l4/bits/syscall.h @@ -44,7 +44,7 @@ /* Return the pointer to the kernel interface page, the API version, the API flags, and the kernel ID. */ -static inline l4_kip_t +static inline _L4_kip_t _L4_attribute_always_inline _L4_attribute_const _L4_kernel_interface (_L4_api_version_t *api_version, _L4_api_flags_t *api_flags, @@ -334,11 +334,11 @@ _L4_processor_control (_L4_word_t proc, _L4_word_t int_freq, } -static inline void +static inline _L4_word_t _L4_attribute_always_inline _L4_memory_control (_L4_word_t control, _L4_word_t *attributes) { - register _L4_word_t ctrl asm ("r3") = control; + register _L4_word_t ctrl_result asm ("r3") = control; register _L4_word_t attr0 asm ("r4") = attributes[0]; register _L4_word_t attr1 asm ("r5") = attributes[1]; register _L4_word_t attr2 asm ("r6") = attributes[2]; @@ -346,9 +346,11 @@ _L4_memory_control (_L4_word_t control, _L4_word_t *attributes) __asm__ __volatile__ ("mtctr %[addr]\n" "bctrl\n" - : - : "r" (ctrl), "r" (attr0), "r" (attr1), + : "+r" (ctrl_result) + : "r" (ctrl_result), "r" (attr0), "r" (attr1), "r" (attr2), "r" (attr3), [addr] "r" (__l4_memory_control) : "r8", "r9", "r10", __L4_PPC_CLOB); + + return ctrl_result; } diff --git a/libl4/powerpc/l4/bits/vregs.h b/libl4/powerpc/l4/bits/vregs.h index aedd96e..f169a77 100644 --- a/libl4/powerpc/l4/bits/vregs.h +++ b/libl4/powerpc/l4/bits/vregs.h @@ -60,12 +60,8 @@ static inline _L4_thread_id_t _L4_attribute_always_inline _L4_my_local_id (void) { - _L4_thread_id_t id; - /* Local thread ID is equal to the UTCB address. */ - id.raw = (_L4_word_t) _L4_utcb (); - - return id; + return (_L4_word_t) _L4_utcb (); } @@ -74,11 +70,9 @@ static inline _L4_thread_id_t _L4_attribute_always_inline _L4_my_global_id (void) { - _L4_thread_id_t id; _L4_word_t *utcb = _L4_utcb (); - id.raw = utcb[_L4_UTCB_MY_GLOBAL_ID]; - return id; + return utcb[_L4_UTCB_MY_GLOBAL_ID]; } @@ -116,11 +110,9 @@ static inline _L4_thread_id_t _L4_attribute_always_inline _L4_pager (void) { - _L4_thread_id_t thread; _L4_word_t *utcb = _L4_utcb (); - thread.raw = utcb[_L4_UTCB_PAGER]; - return thread; + return utcb[_L4_UTCB_PAGER]; } @@ -130,7 +122,7 @@ _L4_set_pager (_L4_thread_id_t thread) { _L4_word_t *utcb = _L4_utcb (); - utcb[_L4_UTCB_PAGER] = thread.raw; + utcb[_L4_UTCB_PAGER] = thread; } @@ -138,11 +130,9 @@ static inline _L4_thread_id_t _L4_attribute_always_inline _L4_exception_handler (void) { - _L4_thread_id_t thread; _L4_word_t *utcb = _L4_utcb (); - thread.raw = utcb[_L4_UTCB_EXC_HANDLER]; - return thread; + return utcb[_L4_UTCB_EXC_HANDLER]; } @@ -152,7 +142,7 @@ _L4_set_exception_handler (_L4_thread_id_t thread) { _L4_word_t *utcb = _L4_utcb (); - utcb[_L4_UTCB_EXC_HANDLER] = thread.raw; + utcb[_L4_UTCB_EXC_HANDLER] = thread; } @@ -270,7 +260,7 @@ _L4_error_code (void) static inline _L4_word_t _L4_attribute_always_inline -_L4_xfer_timeout (void) +_L4_xfer_timeouts (void) { _L4_word_t *utcb = _L4_utcb (); @@ -280,7 +270,7 @@ _L4_xfer_timeout (void) static inline void _L4_attribute_always_inline -_L4_set_xfer_timeout (_L4_word_t time) +_L4_set_xfer_timeouts (_L4_word_t time) { _L4_word_t *utcb = _L4_utcb (); @@ -292,11 +282,9 @@ static inline _L4_thread_id_t _L4_attribute_always_inline _L4_intended_receiver (void) { - _L4_thread_id_t thread; _L4_word_t *utcb = _L4_utcb (); - thread.raw = utcb[_L4_UTCB_RECEIVER]; - return thread; + return utcb[_L4_UTCB_RECEIVER]; } @@ -304,11 +292,9 @@ static inline _L4_thread_id_t _L4_attribute_always_inline _L4_actual_sender (void) { - _L4_thread_id_t thread; _L4_word_t *utcb = _L4_utcb (); - thread.raw = utcb[_L4_UTCB_SENDER]; - return thread; + return utcb[_L4_UTCB_SENDER]; } @@ -318,7 +304,7 @@ _L4_set_virtual_sender (_L4_thread_id_t thread) { _L4_word_t *utcb = _L4_utcb (); - utcb[_L4_UTCB_SENDER] = thread.raw; + utcb[_L4_UTCB_SENDER] = thread; } |