xref: /haiku/headers/os/drivers/dpc.h (revision 6198a9798e8b8eb0210a60ebedf2a839704e4dbe)
1a5347f68SPhilippe Houdoin /* 	DPC module API
2*6198a979SPhilippe Houdoin  *  Copyright 2007-2008, Haiku Inc. All Rights Reserved.
3a5347f68SPhilippe Houdoin  *  Distributed under the terms of the MIT License
4a5347f68SPhilippe Houdoin  */
5a5347f68SPhilippe Houdoin 
6a5347f68SPhilippe Houdoin #ifndef _DPC_MODULE_H_
7a5347f68SPhilippe Houdoin #define _DPC_MODULE_H_
8a5347f68SPhilippe Houdoin 
9*6198a979SPhilippe Houdoin #include <OS.h>
10a5347f68SPhilippe Houdoin #include <module.h>
11a5347f68SPhilippe Houdoin 
12a5347f68SPhilippe Houdoin #ifdef __cplusplus
13a5347f68SPhilippe Houdoin extern "C" {
14a5347f68SPhilippe Houdoin #endif
15a5347f68SPhilippe Houdoin 
16*6198a979SPhilippe Houdoin #define B_DPC_MODULE_NAME "generic/dpc/v1"
17a5347f68SPhilippe Houdoin 
18a5347f68SPhilippe Houdoin typedef void (*dpc_func) (void *arg);
19a5347f68SPhilippe Houdoin 
20a5347f68SPhilippe Houdoin typedef struct {
21a5347f68SPhilippe Houdoin 	module_info	info;
22*6198a979SPhilippe Houdoin 
23*6198a979SPhilippe Houdoin 	status_t	(*new_dpc_queue)(void **queue, const char *name, int32 priority);
24af1c1a0aSPhilippe Houdoin 	status_t	(*delete_dpc_queue)(void *queue);
25*6198a979SPhilippe Houdoin 	status_t	(*queue_dpc)(void *queue, dpc_func func, void *arg);
26a5347f68SPhilippe Houdoin } dpc_module_info;
27a5347f68SPhilippe Houdoin 
28a5347f68SPhilippe Houdoin 
29a5347f68SPhilippe Houdoin #ifdef __cplusplus
30a5347f68SPhilippe Houdoin }
31a5347f68SPhilippe Houdoin #endif
32a5347f68SPhilippe Houdoin 
33*6198a979SPhilippe Houdoin #endif		// _DPC_MODULE_H_
34