[lkml]   [2006]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [Lse-tech] [PATCH 09/11] Task watchers: Add support for per-task watchers
Andrew Morton wrote:
> Matt Helsley <> wrote:
>>>> +static inline int notify_per_task_watchers(unsigned int val,
>>>> + struct task_struct *task)
>>>> +{
>>>> + if (get_watch_event(val) != WATCH_TASK_INIT)
>>>> + return raw_notifier_call_chain(&task->notify, val, task);
>>>> + RAW_INIT_NOTIFIER_HEAD(&task->notify);
>>>> + if (task->real_parent)
>>>> + return raw_notifier_call_chain(&task->real_parent->notify,
>>>> + val, task);
>>>> +}
>>> It's possible for this task to exit without returning a result.
>> Assuming you meant s/task/function/:
>> In the common case this will return a result because most tasks have a
>> real parent. The only exception should be the init task. However, the
>> init task does not "fork" from another task so this function will never
>> get called with WATCH_TASK_INIT and the init task.
>> This means that if one wants to use per-task watchers to associate data
>> and a function call with *every* task, special care will need to be
>> taken to register with the init task.
> no......
> It's possible for this function to fall off the end without returning
> anything. The compiler should have spat a warning.

I checked and it does.

Peter Williams

"Learning, n. The kind of ignorance distinguishing the studious."
-- Ambrose Bierce
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-06-21 01:26    [W:0.059 / U:5.480 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site