Back to index

glibc  2.9
Defines | Functions | Variables
mig-reply.c File Reference
#include <mach.h>
#include <hurd/threadvar.h>

Go to the source code of this file.


#define GETPORT
#define reply_port   (*(use_threadvar ? portloc : &global_reply_port))


mach_port_t __mig_get_reply_port (void)
 weak_alias (__mig_get_reply_port, mig_get_reply_port)
 weak_alias (__mig_dealloc_reply_port, mig_dealloc_reply_port)
 weak_alias (__mig_put_reply_port, mig_put_reply_port)


static int use_threadvar
static mach_port_t global_reply_port

Define Documentation

#define GETPORT
mach_port_t *portloc = \
    (mach_port_t *) __hurd_threadvar_location (_HURD_THREADVAR_MIG_REPLY)

Definition at line 22 of file mig-reply.c.

#define reply_port   (*(use_threadvar ? portloc : &global_reply_port))

Definition at line 25 of file mig-reply.c.

Function Documentation

mach_port_t __mig_get_reply_port ( void  )

Definition at line 34 of file mig-reply.c.


  if (reply_port == MACH_PORT_NULL)
    reply_port = __mach_reply_port ();

  return reply_port;

Here is the call graph for this function:

Definition at line 43 of file mig-reply.c.

  mach_port_t port;


  port = reply_port;
  reply_port = MACH_PORT_NULL;     /* So the mod_refs RPC won't use it.  */

  if (MACH_PORT_VALID (port))
    __mach_port_mod_refs (__mach_task_self (), port,
                       MACH_PORT_RIGHT_RECEIVE, -1);

Here is the call graph for this function:

Definition at line 60 of file mig-reply.c.

  /* Do nothing.  */

Definition at line 69 of file mig-reply.c.

  use_threadvar = stack != 0;

  if (use_threadvar)
      /* Recycle the reply port used before multithreading was enabled.  */
      mach_port_t *portloc = (mach_port_t *)
       __hurd_threadvar_location_from_sp (_HURD_THREADVAR_MIG_REPLY, stack);
      *portloc = global_reply_port;
      global_reply_port = MACH_PORT_NULL;

Here is the call graph for this function:

Variable Documentation

mach_port_t global_reply_port [static]

Definition at line 28 of file mig-reply.c.

int use_threadvar [static]

Definition at line 27 of file mig-reply.c.