mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
__UNIQUE_ID()
Jan Beulich points out __COUNTER__ (gcc 4.3 and above), so let's use that to create unique ids. This is better than __LINE__ which we use today, so provide a wrapper. Stanislaw Gruszka <sgruszka@redhat.com> reported that some module parameters start with a digit, so we need to prepend when we for the unique id. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
parent
d890f510c8
commit
6f33d58794
2 changed files with 11 additions and 0 deletions
|
@ -31,6 +31,8 @@
|
|||
|
||||
#define __linktime_error(message) __attribute__((__error__(message)))
|
||||
|
||||
#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
|
||||
|
||||
#if __GNUC_MINOR__ >= 5
|
||||
/*
|
||||
* Mark a position in code as unreachable. This can be used to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue