Back to index

glibc  2.9
Functions
insremque.c File Reference
#include <stddef.h>
#include <search.h>

Go to the source code of this file.

Functions

void insque (void *elem, void *prev)
void remque (void *elem)

Function Documentation

void insque ( void *  elem,
void *  prev 
)

Definition at line 25 of file insremque.c.

{
  if (prev == NULL)
    {
      ((struct qelem *) elem)->q_forw = NULL;
      ((struct qelem *) elem)->q_back = NULL;
    }
  else
    {
      struct qelem *next = ((struct qelem *) prev)->q_forw;
      ((struct qelem *) prev)->q_forw = (struct qelem *) elem;
      if (next != NULL)
       next->q_back = (struct qelem *) elem;
      ((struct qelem *) elem)->q_forw = next;
      ((struct qelem *) elem)->q_back = (struct qelem *) prev;
    }
}

Here is the caller graph for this function:

void remque ( void *  elem)

Definition at line 46 of file insremque.c.

{
  struct qelem *next = ((struct qelem *) elem)->q_forw;
  struct qelem *prev = ((struct qelem *) elem)->q_back;
  if (next != NULL)
    next->q_back = prev;
  if (prev != NULL)
    prev->q_forw = (struct qelem *) next;
}

Here is the caller graph for this function: