struct assignment?

loody miloody at gmail.com
Fri Feb 18 09:35:01 EST 2011


hi all:
I found there seems no declaring about "struct ftrace_entry".
below the greping result of my kernel source code:

# grep -rwn 'struct ftrace_entry' *
kernel/trace/trace.h:214:		IF_ASSIGN(var, ent, struct ftrace_entry, TRACE_FN);	\
kernel/trace/trace_events.c:1483:	struct ftrace_entry *entry;
kernel/trace/trace_output.c:818:	struct ftrace_entry *field;
kernel/trace/trace_output.c:845:	struct ftrace_entry *field;
kernel/trace/trace_output.c:859:	struct ftrace_entry *field;
kernel/trace/trace_output.c:872:	struct ftrace_entry *field;
kernel/trace/trace.c:1098:	struct ftrace_entry *entry;
#


usually we use a struct we will declare its elements such as:

struct usb_host_endpoint {
	struct usb_endpoint_descriptor	desc;
	struct list_head		urb_list;
	void				*hcpriv;
......................
};

I guess the secret should be "if_assign", but how does compiler interpret it?

-- 
Regards,
miloody



More information about the Kernelnewbies mailing list