|
#define | my_offsetof(st, m) ((size_t)( (unsigned char *)&((st)->m ) - (unsigned char *)(st))) |
| This macro is a slightly-different implementation of the standard offsetof macro.
|
|
#define | list(type) type * |
| Declare a "typed" list. This is a pointer to type, but the variable will instead reference a struct rootsim_list!
|
|
#define | new_list(type) |
|
#define | list_sizeof(list) ((struct rootsim_list *)list)->size |
|
#define | list_head(list) ((__typeof__ (list))(((rootsim_list *)(list))->head)) |
|
#define | list_tail(list) ((__typeof__ (list))(((rootsim_list *)(list))->tail)) |
|
#define | list_next(ptr) ((ptr)->next) |
|
#define | list_prev(ptr) ((ptr)->prev) |
|
#define | get_key(data) |
| This macro retrieves the key of a payload data structure given its offset, and casts the value to double. More...
|
|
#define | list_empty(list) (((rootsim_list *)list)->size == 0) |
|
#define | list_insert_tail(li, data) |
|
#define | list_insert_head(li, data) |
|
#define | list_insert(li, key_name, data) |
| Insert a new node in the list.
|
|
#define | list_delete_by_content(li, node) |
|
#define | list_pop(list) |
|
#define | list_trunc(list, key_name, key_value, release_fn) |
| Truncate a list up to a certain point, starting from the head. More...
|
|
#define | list_size(list) ((rootsim_list *)(list))->size |
|
Generic Lists.
This header defines macros to access lists of generic objects.
- Copyright
- Copyright (C) 2008-2019 HPDCS Group https://hpdcs.github.io
This file is part of ROOT-Sim (ROme OpTimistic Simulator).
ROOT-Sim is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; only version 3 of the License applies.
ROOT-Sim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with ROOT-Sim; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- Author
- Alessandro Pellegrini
- Date
- November 5, 2013
Definition in file list.h.