qos_list.h File Reference

#include <linux/list.h>

Go to the source code of this file.

Defines

#define offsetof(TYPE, MEMBER)   ((size_t) &((TYPE *)0)->MEMBER)
#define container_of(ptr, type, member)
#define __KERNEL__
#define __ASM_I386_PROCESSOR_H
#define _LINUX_KERNEL_H
#define __ASM_SYSTEM_H
#define INIT_LIST_HEAD_NULL(ptr)   do { (ptr)->prev = NULL; (ptr)->next = NULL; } while (0)
#define list_add_ordered(head, obj_type, obj, list_field, ord_field, ret)
 add an object in an ordered list insert in the (head) list the (obj) of type (obj_type), ordered in increasing order by field (ord_field) of (obj) example list_add_ordered (ready_list, server_t, srv, rq_ph, deadline, ret) NOTE: in the parameters description "" are used for argument that are name and not variables.

Functions

static void list_del_null (struct list_head *entry)
 Remove from list and set to NULL pointers that point to next and previous objects.

Define Documentation

#define __ASM_I386_PROCESSOR_H

Definition at line 14 of file qos_list.h.

#define __ASM_SYSTEM_H

Definition at line 16 of file qos_list.h.

#define __KERNEL__

Definition at line 13 of file qos_list.h.

#define _LINUX_KERNEL_H

Definition at line 15 of file qos_list.h.

#define container_of ( ptr,
type,
member   ) 
Value:
({                      \
        const typeof( ((type *)0)->member ) *__mptr = (ptr);    \
        (type *)( (char *)__mptr - offsetof(type,member) );})

Definition at line 10 of file qos_list.h.

#define INIT_LIST_HEAD_NULL ( ptr   )     do { (ptr)->prev = NULL; (ptr)->next = NULL; } while (0)

Definition at line 27 of file qos_list.h.

Referenced by rres_add_to_srv_set(), and rres_remove_from_srv_set().

#define list_add_ordered ( head,
obj_type,
obj,
list_field,
ord_field,
ret   ) 
Value:
do { \
  struct list_head *h; \
  if (list_empty(&head)) { \
    list_add(&((obj)->list_field ), &(head)); \
    goto __ret1; \
  } else { \
    for (h = (head).next; h != &(head); h = h->next) { \
      if ( kal_time_lt( (obj)->ord_field, (list_entry(h, struct obj_type, list_field)->ord_field) ) ) { \
        break; \
      } \
    } \
    list_add_tail(&((obj)->list_field), h); \
  } \
  if (&((obj)->list_field) == (head).next) { \
    goto __ret1; \
  } \
  (ret) = 0; \
  break; \
__ret1: \
  (ret) = 1; \
} while (0)

add an object in an ordered list insert in the (head) list the (obj) of type (obj_type), ordered in increasing order by field (ord_field) of (obj) example list_add_ordered (ready_list, server_t, srv, rq_ph, deadline, ret) NOTE: in the parameters description "" are used for argument that are name and not variables.

Parameters:
head,: (struct list_head * ) head of the list
obj_type: ("object type") type of each element of the list
obj: (obj_type object) object that must be added to the list list_field: ("name of field") name of field used to insert the object in the list
ord_field: ("name of filed") name of filed the list is ordered by
ret: (int) return value is put here
return 1 if the object is inserted at the beginning of the list
return 0 otherwise

Definition at line 44 of file qos_list.h.

Referenced by ready_queue_add().

#define offsetof ( TYPE,
MEMBER   )     ((size_t) &((TYPE *)0)->MEMBER)

Definition at line 9 of file qos_list.h.

Referenced by qres_init().


Function Documentation

static void list_del_null ( struct list_head *  entry  )  [inline, static]

Remove from list and set to NULL pointers that point to next and previous objects.

Definition at line 68 of file qos_list.h.

Referenced by ready_queue_remove().

Generated on Mon Aug 2 22:39:17 2010 for qosres by  doxygen 1.6.3