user2699113
user2699113

Reputation: 4509

explanation of wait_event_timeout

I've got some part of linux kernel sources:

#define wait_event_timeout(wq, condition, timeout)                      \
({                                                                      \
        long __ret = timeout;                                           \
        if (!(condition))                                               \
                __wait_event_timeout(wq, condition, __ret);             \
        __ret;                                                          \
})

and I cannot understand what does the last "__ret;" do?

Can anyone explain it?

Upvotes: 0

Views: 925

Answers (1)

Federico
Federico

Reputation: 3892

This is a C problem: __ret is the return value of that macro. It is also written in the comment above that macro

Upvotes: 1

Related Questions