]> git.buserror.net Git - polintos/scott/priv.git/blob - kernel/include/kern/notifier.h
Random stuff.
[polintos/scott/priv.git] / kernel / include / kern / notifier.h
1 #ifndef _KERN_NOTIFIER_H
2 #define _KERN_NOTIFIER_H
3
4 #include <System.h>
5 #include <System/IO.h>
6
7 using System::Notifiers::Notifier;
8
9 namespace IO {
10         using System::IO::IONotifierInfo;
11         typedef System::IO::IONotifierInfo_ns::Result io_result;
12         
13         static inline void io_notify(Notifier n, size_t len, io_result result)
14         {
15                 // FIXME: ini needs to live longer.
16                 IONotifierInfo ini;
17                 ini.len = len;
18                 ini.result = result;
19                 n.notify(&ini);
20         }
21 }
22
23 #endif