cfq_cfqq_slice_new(
) is defined through a macro.
On line 441 you'll see
CFQ_CFQQ_FNS(slice_new);
Which invokes:
#define CFQ_CFQQ_FNS(name) \
static inline void cfq_mark_cfqq_##name(struct cfq_queue *cfqq) \
{ \
(cfqq)->flags |= (1 << CFQ_CFQQ_FLAG_##name); \
} \
static inline void cfq_clear_cfqq_##name(struct cfq_queue *cfqq) \
{ \
(cfqq)->flags &= ~(1 << CFQ_CFQQ_FLAG_##name); \
} \
static inline int cfq_cfqq_##name(const struct cfq_queue *cfqq) \
{ \
return ((cfqq)->flags & (1 << CFQ_CFQQ_FLAG_##name)) != 0; \
}
resulting in:
static inline void cfq_mark_cfqq_slice_new(struct cfq_queue *cfqq)
{
(cfqq)->flags |= (1 << CFQ_CFQQ_FLAG_slice_new);
}
static inline void cfq_clear_cfqq_slice_new(struct cfq_queue *cfqq)
{
(cfqq)->flags &= ~(1 << CFQ_CFQQ_FLAG_slice_new);
}
static inline int cfq_cfqq_slice_new(const struct cfq_queue *cfqq)
{
return ((cfqq)->flags & (1 << CFQ_CFQQ_FLAG_slice_new)) != 0;
}
A bit earlier in the code is a enum
which declares:
CFQ_CFQQ_FLAG_slice_new, /* no requests dispatched in slice */
So cfq_cfqq_slice_new()
just returns whether or not the CFQ_CFQQ_FLAG_slice_new
is set in the struct cfq_queue.flags
member.