blob: 080d7964c531f5388af05b6344ad952838a1ac10 [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
Ben Cheng654325d2012-03-07 21:13:49 -080010 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080017 ****************************************************************************
18 ****************************************************************************/
19#ifndef _LINUX_NOTIFIER_H
20#define _LINUX_NOTIFIER_H
21#include <linux/errno.h>
22#include <linux/mutex.h>
Ben Cheng654325d2012-03-07 21:13:49 -080023/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080024#include <linux/rwsem.h>
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080025struct notifier_block {
26 int (*notifier_call)(struct notifier_block *, unsigned long, void *);
27 struct notifier_block *next;
Ben Cheng654325d2012-03-07 21:13:49 -080028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080029 int priority;
30};
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080031struct atomic_notifier_head {
32 spinlock_t lock;
Ben Cheng654325d2012-03-07 21:13:49 -080033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080034 struct notifier_block *head;
35};
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080036struct blocking_notifier_head {
37 struct rw_semaphore rwsem;
Ben Cheng654325d2012-03-07 21:13:49 -080038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080039 struct notifier_block *head;
40};
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080041struct raw_notifier_head {
42 struct notifier_block *head;
Ben Cheng654325d2012-03-07 21:13:49 -080043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080044};
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080045#define ATOMIC_INIT_NOTIFIER_HEAD(name) do { spin_lock_init(&(name)->lock); (name)->head = NULL; } while (0)
46#define BLOCKING_INIT_NOTIFIER_HEAD(name) do { init_rwsem(&(name)->rwsem); (name)->head = NULL; } while (0)
47#define RAW_INIT_NOTIFIER_HEAD(name) do { (name)->head = NULL; } while (0)
Ben Cheng654325d2012-03-07 21:13:49 -080048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080049#define ATOMIC_NOTIFIER_INIT(name) { .lock = __SPIN_LOCK_UNLOCKED(name.lock), .head = NULL }
50#define BLOCKING_NOTIFIER_INIT(name) { .rwsem = __RWSEM_INITIALIZER((name).rwsem), .head = NULL }
51#define RAW_NOTIFIER_INIT(name) { .head = NULL }
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080052#define ATOMIC_NOTIFIER_HEAD(name) struct atomic_notifier_head name = ATOMIC_NOTIFIER_INIT(name)
Ben Cheng654325d2012-03-07 21:13:49 -080053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080054#define BLOCKING_NOTIFIER_HEAD(name) struct blocking_notifier_head name = BLOCKING_NOTIFIER_INIT(name)
55#define RAW_NOTIFIER_HEAD(name) struct raw_notifier_head name = RAW_NOTIFIER_INIT(name)
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080056#endif