2007-01-10 23:28:45 +03:00
|
|
|
/* DPC module API
|
2008-02-07 02:10:13 +03:00
|
|
|
* Copyright 2007-2008, Haiku Inc. All Rights Reserved.
|
2007-01-10 23:28:45 +03:00
|
|
|
* Distributed under the terms of the MIT License
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _DPC_MODULE_H_
|
|
|
|
#define _DPC_MODULE_H_
|
|
|
|
|
2008-02-07 02:10:13 +03:00
|
|
|
#include <OS.h>
|
2007-01-10 23:28:45 +03:00
|
|
|
#include <module.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2008-02-07 02:10:13 +03:00
|
|
|
#define B_DPC_MODULE_NAME "generic/dpc/v1"
|
2007-01-10 23:28:45 +03:00
|
|
|
|
|
|
|
typedef void (*dpc_func) (void *arg);
|
|
|
|
|
|
|
|
typedef struct {
|
2008-02-07 02:10:13 +03:00
|
|
|
module_info info;
|
|
|
|
|
|
|
|
status_t (*new_dpc_queue)(void **queue, const char *name, int32 priority);
|
2007-01-15 00:58:19 +03:00
|
|
|
status_t (*delete_dpc_queue)(void *queue);
|
2008-02-07 02:10:13 +03:00
|
|
|
status_t (*queue_dpc)(void *queue, dpc_func func, void *arg);
|
2007-01-10 23:28:45 +03:00
|
|
|
} dpc_module_info;
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2008-02-07 02:10:13 +03:00
|
|
|
#endif // _DPC_MODULE_H_
|