Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
aix.c File Reference
#include "primpl.h"
#include <sys/select.h>
#include <sys/poll.h>
#include <dlfcn.h>

Go to the source code of this file.

Functions

void _MD_EarlyInit (void)
PRWord_MD_HomeGCRegisters (PRThread *t, int isCurrent, int *np)
 _MD_SET_PRIORITY (_MDThread *thread, PRUintn newPri)
 _MD_InitializeThread (PRThread *thread)
 _MD_WAIT (PRThread *thread, PRIntervalTime ticks)
 _MD_WAKEUP_WAITER (PRThread *thread)
 _MD_YIELD (void)
 _MD_CREATE_THREAD (PRThread *thread, void(*start)(void *), PRThreadPriority priority, PRThreadScope scope, PRThreadState state, PRUint32 stackSize)
int _MD_SELECT (int width, fd_set *r, fd_set *w, fd_set *e, struct timeval *t)
int _MD_POLL (void *listptr, unsigned long nfds, long timeout)

Variables

static int(* aix_select_fcn )() = NULL
static int(* aix_poll_fcn )() = NULL

Function Documentation

_MD_CREATE_THREAD ( PRThread thread,
void(*)(void *)  start,
PRThreadPriority  priority,
PRThreadScope  scope,
PRThreadState  state,
PRUint32  stackSize 
)

Definition at line 193 of file aix.c.

{
    PR_NOT_REACHED("_MD_CREATE_THREAD should not be called for AIX.");
}

Definition at line 132 of file aix.c.

{
#if defined(AIX_TIMERS)
    _MD_AixIntervalInit();
#endif
}
PRWord* _MD_HomeGCRegisters ( PRThread t,
int  isCurrent,
int np 
)

Definition at line 141 of file aix.c.

{
#ifndef _PR_PTHREADS
    if (isCurrent) {
       (void) setjmp(CONTEXT(t));
    }
    *np = sizeof(CONTEXT(t)) / sizeof(PRWord);
    return (PRWord *) CONTEXT(t);
#else
       *np = 0;
       return NULL;
#endif
}

Definition at line 163 of file aix.c.

{
       return PR_SUCCESS;
}
int _MD_POLL ( void listptr,
unsigned long  nfds,
long  timeout 
)

Definition at line 244 of file aix.c.

{
    int rv;

    if (!aix_poll_fcn) {
        void *aix_handle;

       aix_handle = dlopen("/unix", RTLD_NOW);
       if (!aix_handle) {
           PR_SetError(PR_UNKNOWN_ERROR, 0);
           return -1;
       }
       aix_poll_fcn = (int(*)())dlsym(aix_handle,"poll");
        dlclose(aix_handle);
       if (!aix_poll_fcn) {
           PR_SetError(PR_UNKNOWN_ERROR, 0);
           return -1;
       }
    }
    rv = (*aix_poll_fcn)(listptr, nfds, timeout);
    return rv;
}

Here is the caller graph for this function:

int _MD_SELECT ( int  width,
fd_set r,
fd_set w,
fd_set e,
struct timeval t 
)

Definition at line 221 of file aix.c.

{
    int rv;

    if (!aix_select_fcn) {
        void *aix_handle;

       aix_handle = dlopen("/unix", RTLD_NOW);
       if (!aix_handle) {
           PR_SetError(PR_UNKNOWN_ERROR, 0);
           return -1;
       }
       aix_select_fcn = (int(*)())dlsym(aix_handle,"select");
        dlclose(aix_handle);
       if (!aix_select_fcn) {
           PR_SetError(PR_UNKNOWN_ERROR, 0);
           return -1;
       }
    }
    rv = (*aix_select_fcn)(width, r, w, e, t);
    return rv;
}

Here is the caller graph for this function:

_MD_SET_PRIORITY ( _MDThread thread,
PRUintn  newPri 
)

Definition at line 157 of file aix.c.

{
    return;
}
_MD_WAIT ( PRThread thread,
PRIntervalTime  ticks 
)

Definition at line 169 of file aix.c.

{
    PR_ASSERT(!(thread->flags & _PR_GLOBAL_SCOPE));
    _PR_MD_SWITCH_CONTEXT(thread);
    return PR_SUCCESS;
}

Here is the call graph for this function:

_MD_WAKEUP_WAITER ( PRThread thread)

Definition at line 177 of file aix.c.

{
    if (thread) {
       PR_ASSERT(!(thread->flags & _PR_GLOBAL_SCOPE));
    }
    return PR_SUCCESS;
}
_MD_YIELD ( void  )

Definition at line 187 of file aix.c.

{
    PR_NOT_REACHED("_MD_YIELD should not be called for AIX.");
}

Variable Documentation

int(* aix_poll_fcn)() = NULL [static]

Definition at line 219 of file aix.c.

int(* aix_select_fcn)() = NULL [static]

Definition at line 218 of file aix.c.