mips32
[Libc]

mips32 architecture dependent parts of libc More...

Files

file  arch/mips32/include/atomic.h
file  arch/mips32/include/endian.h
file  arch/mips32/include/limits.h
file  arch/mips32/include/psthread.h
file  stackarg.h
file  arch/mips32/include/thread.h
file  arch/mips32/include/types.h
file  syscall.c
file  arch/mips32/src/thread.c

Data Structures

struct  context_t
struct  tcb_t

Defines

#define atomic_inc(x)   ((void) atomic_add(x, 1))
#define atomic_dec(x)   ((void) atomic_add(x, -1))
#define atomic_postinc(x)   (atomic_add(x, 1) - 1)
#define atomic_postdec(x)   (atomic_add(x, -1) + 1)
#define atomic_preinc(x)   atomic_add(x, 1)
#define atomic_predec(x)   atomic_add(x, -1)
#define __BYTE_ORDER   __LITTLE_ENDIAN
#define LONG_MIN   MIN_INT32
#define LONG_MAX   MAX_INT32
#define ULONG_MIN   MIN_UINT32
#define ULONG_MAX   MAX_UINT32
#define context_set(c, _pc, stack, size, ptls)
#define SP_DELTA   (8+16)
#define __VARARGS_DEFINED
#define va_start(ap, lst)   ((ap) = (va_list)&(lst) + sizeof(lst))
#define va_arg(ap, type)   (((type *)((ap) = (va_list)( (sizeof(type) <= 4) ? ((uint32_t)((ap) + 2*4 - 1) & (~3)) : ((uint32_t)((ap) + 2*8 -1) & (~7)) )))[-1])
#define va_end(ap)
#define MIPS_TP_OFFSET   0x7000

Typedefs

typedef uint8_tva_list
typedef unsigned int sysarg_t
typedef unsigned int size_t
typedef signed int ssize_t
typedef ssize_t off_t
typedef char int8_t
typedef short int int16_t
typedef long int int32_t
typedef long long int int64_t
typedef unsigned char uint8_t
typedef unsigned short int uint16_t
typedef unsigned long int uint32_t
typedef unsigned long long int uint64_t

Functions

static long atomic_add (atomic_t *val, int i)
static void __tcb_set (tcb_t *tcb)
static tcb_t__tcb_get (void)
sysarg_t __syscall (const sysarg_t p1, const sysarg_t p2, const sysarg_t p3, const sysarg_t p4, const syscall_t id)
tcb_t__alloc_tls (void **data, size_t size)
void __free_tls_arch (tcb_t *tcb, size_t size)

Detailed Description


Define Documentation

#define atomic_inc  )     ((void) atomic_add(x, 1))
 

Definition at line 39 of file arch/mips32/include/atomic.h.

Referenced by futex_down_timeout().

#define atomic_dec  )     ((void) atomic_add(x, -1))
 

Definition at line 40 of file arch/mips32/include/atomic.h.

#define atomic_postinc  )     (atomic_add(x, 1) - 1)
 

Definition at line 42 of file arch/mips32/include/atomic.h.

Referenced by futex_up().

#define atomic_postdec  )     (atomic_add(x, -1) + 1)
 

Definition at line 43 of file arch/mips32/include/atomic.h.

#define atomic_preinc  )     atomic_add(x, 1)
 

Definition at line 45 of file arch/mips32/include/atomic.h.

#define atomic_predec  )     atomic_add(x, -1)
 

Definition at line 46 of file arch/mips32/include/atomic.h.

Referenced by futex_down_timeout().

#define __BYTE_ORDER   __LITTLE_ENDIAN
 

Definition at line 44 of file arch/mips32/include/endian.h.

#define LONG_MIN   MIN_INT32
 

Definition at line 39 of file arch/mips32/include/limits.h.

Referenced by strtol().

#define LONG_MAX   MAX_INT32
 

Definition at line 40 of file arch/mips32/include/limits.h.

Referenced by strtol().

#define ULONG_MIN   MIN_UINT32
 

Definition at line 41 of file arch/mips32/include/limits.h.

#define ULONG_MAX   MAX_UINT32
 

Definition at line 42 of file arch/mips32/include/limits.h.

Referenced by _strtoul().

#define context_set c,
_pc,
stack,
size,
ptls   ) 
 

Value:

(c)->pc = (sysarg_t) (_pc);                             \
        (c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA;     \
        (c)->tls = ((sysarg_t)(ptls)) + 0x7000 + sizeof(tcb_t);

Definition at line 46 of file arch/mips32/include/psthread.h.

Referenced by psthread_create().

#define SP_DELTA   (8+16)
 

Definition at line 55 of file arch/mips32/include/psthread.h.

#define __VARARGS_DEFINED
 

Definition at line 40 of file stackarg.h.

#define va_start ap,
lst   )     ((ap) = (va_list)&(lst) + sizeof(lst))
 

Definition at line 51 of file stackarg.h.

Referenced by printf(), snprintf(), and sprintf().

#define va_arg ap,
type   )     (((type *)((ap) = (va_list)( (sizeof(type) <= 4) ? ((uint32_t)((ap) + 2*4 - 1) & (~3)) : ((uint32_t)((ap) + 2*8 -1) & (~7)) )))[-1])
 

Definition at line 54 of file stackarg.h.

Referenced by printf_core().

#define va_end ap   ) 
 

Definition at line 57 of file stackarg.h.

Referenced by printf(), snprintf(), and sprintf().

#define MIPS_TP_OFFSET   0x7000
 

Definition at line 53 of file arch/mips32/include/thread.h.

Referenced by __tcb_get(), and __tcb_set().


Typedef Documentation

typedef uint8_t* va_list
 

va_arg macro for MIPS32 - problem is that 64 bit values must be aligned on an 8-byte boundary (32bit values not) To satisfy this, paddings must be sometimes inserted.

Definition at line 49 of file stackarg.h.

typedef unsigned int sysarg_t
 

Definition at line 39 of file arch/mips32/include/types.h.

typedef unsigned int size_t
 

Definition at line 40 of file arch/mips32/include/types.h.

typedef signed int ssize_t
 

Definition at line 41 of file arch/mips32/include/types.h.

typedef ssize_t off_t
 

Definition at line 42 of file arch/mips32/include/types.h.

typedef char int8_t
 

Definition at line 44 of file arch/mips32/include/types.h.

typedef short int int16_t
 

Definition at line 45 of file arch/mips32/include/types.h.

typedef long int int32_t
 

Definition at line 46 of file arch/mips32/include/types.h.

typedef long long int int64_t
 

Definition at line 47 of file arch/mips32/include/types.h.

typedef unsigned char uint8_t
 

Definition at line 49 of file arch/mips32/include/types.h.

typedef unsigned short int uint16_t
 

Definition at line 50 of file arch/mips32/include/types.h.

typedef unsigned long int uint32_t
 

Definition at line 51 of file arch/mips32/include/types.h.

typedef unsigned long long int uint64_t
 

Definition at line 52 of file arch/mips32/include/types.h.


Function Documentation

static long atomic_add atomic_t val,
int  i
[static]
 

Definition at line 55 of file arch/mips32/include/atomic.h.

References atomic::count.

static void __tcb_set tcb_t tcb  )  [static]
 

Definition at line 59 of file arch/mips32/include/thread.h.

References MIPS_TP_OFFSET.

Referenced by __main(), and __thread_main().

static tcb_t* __tcb_get void   )  [static]
 

Definition at line 67 of file arch/mips32/include/thread.h.

References MIPS_TP_OFFSET.

Referenced by __exit(), psthread_get_id(), psthread_main(), and psthread_schedule_next_adv().

sysarg_t __syscall const sysarg_t  p1,
const sysarg_t  p2,
const sysarg_t  p3,
const sysarg_t  p4,
const syscall_t  id
 

Definition at line 38 of file syscall.c.

tcb_t* __alloc_tls void **  data,
size_t  size
 

Allocate TLS & TCB for initial module threads

Parameters:
data (out) Start of TLS section
size Size of tdata+tbss section
Returns:
pointer to tcb_t structure

Definition at line 45 of file arch/mips32/src/thread.c.

Referenced by __make_tls().

void __free_tls_arch tcb_t tcb,
size_t  size
 

Definition at line 54 of file arch/mips32/src/thread.c.

Referenced by __free_tls().


Generated on Sun Jun 18 18:08:45 2006 for HelenOS Userspace (mips32) by  doxygen 1.4.6