Skip to content

Commit

Permalink
rename list_entry for tm to avoid name overlapping
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed Oct 5, 2016
1 parent f8c11e1 commit 21a57ab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions lib/list.h
Expand Up @@ -21,6 +21,8 @@
#ifndef __OSS_LIST_H__
#define __OSS_LIST_H__

#include <stddef.h>

#define LIST_POISON1 ((void *) 0x00100100)
#define LIST_POISON2 ((void *) 0x00200200)

Expand Down
16 changes: 8 additions & 8 deletions modules/tm/h_table.h
Expand Up @@ -326,26 +326,26 @@ struct s_table
};


#define list_entry(ptr, type, member) \
#define tm_list_entry(ptr, type, member) \
((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))

#define get_retr_timer_payload(_tl_) \
list_entry( _tl_, struct retr_buf, retr_timer)
tm_list_entry( _tl_, struct retr_buf, retr_timer)
#define get_fr_timer_payload(_tl_) \
list_entry( _tl_, struct retr_buf, fr_timer)
tm_list_entry( _tl_, struct retr_buf, fr_timer)
#define get_wait_timer_payload(_tl_) \
list_entry( _tl_, struct cell, wait_tl)
tm_list_entry( _tl_, struct cell, wait_tl)
#define get_dele_timer_payload(_tl_) \
list_entry( _tl_, struct cell, dele_tl)
tm_list_entry( _tl_, struct cell, dele_tl)

#define get_T_from_reply_rb(_rb_) \
list_entry( list_entry( _rb_, (struct ua_server), response),\
tm_list_entry( tm_list_entry( _rb_, (struct ua_server), response),\
struct cell, uas)
#define get_T_from_request_rb(_rb_, _br_) \
list_entry( list_entry( (rb_, (struct ua_client), request) - \
tm_list_entry( tm_list_entry( (rb_, (struct ua_client), request) - \
(_br_)*sizeof(struct retr_buf), struct cell, uas)
#define get_T_from_cancel_rb(_rb_, _br_) \
list_entry( list_entry( (rb_, (struct ua_client), local_cancel) - \
tm_list_entry( tm_list_entry( (rb_, (struct ua_client), local_cancel) - \
(_br_)*sizeof(struct retr_buf), struct cell, uas)

#define is_invite(_t_) ((_t_)->flags&T_IS_INVITE_FLAG)
Expand Down

0 comments on commit 21a57ab

Please sign in to comment.