Back to index

glibc  2.9
Functions | Variables
getdport.c File Reference
#include <hurd.h>

Go to the source code of this file.


 weak_alias (_default_hurd_getdport_fn, _hurd_getdport_fn)


static file_t(* _default_hurd_getdport_fn )(int fd)=0

Function Documentation

Definition at line 25 of file getdport.c.

  if (_hurd_getdport_fn)
    /* dtable.c has defined the function to fetch a port from the real file
       descriptor table.  */
    return (*_hurd_getdport_fn) (fd);

  /* getdport is the only use of file descriptors,
     so we don't bother allocating a real table.  */

  if (_hurd_init_dtable == NULL)
      /* Never had a descriptor table.  */
      errno = EBADF;
      return MACH_PORT_NULL;

  if (fd < 0 || (unsigned int) fd > _hurd_init_dtablesize ||
      _hurd_init_dtable[fd] == MACH_PORT_NULL)
      errno = EBADF;
      return MACH_PORT_NULL;
      __mach_port_mod_refs (__mach_task_self (), _hurd_init_dtable[fd],
                         MACH_PORT_RIGHT_SEND, 1);
      return _hurd_init_dtable[fd];

Here is the call graph for this function:

Variable Documentation

file_t(* _default_hurd_getdport_fn)(int fd)=0 [static]

Definition at line 24 of file getdport.c.