1*a5347f68SPhilippe Houdoin /* DPC module API 2*a5347f68SPhilippe Houdoin * Copyright 2007, Haiku Inc. All Rights Reserved. 3*a5347f68SPhilippe Houdoin * Distributed under the terms of the MIT License 4*a5347f68SPhilippe Houdoin */ 5*a5347f68SPhilippe Houdoin 6*a5347f68SPhilippe Houdoin #ifndef _DPC_MODULE_H_ 7*a5347f68SPhilippe Houdoin #define _DPC_MODULE_H_ 8*a5347f68SPhilippe Houdoin 9*a5347f68SPhilippe Houdoin #include <module.h> 10*a5347f68SPhilippe Houdoin 11*a5347f68SPhilippe Houdoin #ifdef __cplusplus 12*a5347f68SPhilippe Houdoin extern "C" { 13*a5347f68SPhilippe Houdoin #endif 14*a5347f68SPhilippe Houdoin 15*a5347f68SPhilippe Houdoin #define B_DPC_MODULE_NAME "generic/dpc/v1" 16*a5347f68SPhilippe Houdoin 17*a5347f68SPhilippe Houdoin typedef void (*dpc_func) (void *arg); 18*a5347f68SPhilippe Houdoin 19*a5347f68SPhilippe Houdoin typedef struct { 20*a5347f68SPhilippe Houdoin module_info info; 21*a5347f68SPhilippe Houdoin void * (*new_dpc_thread)(const char *name, long priority, int queue_size); 22*a5347f68SPhilippe Houdoin status_t (*delete_dpc_thread)(void *thread); 23*a5347f68SPhilippe Houdoin status_t (*queue_dpc)(void *thread, dpc_func dpc_name, void *arg); 24*a5347f68SPhilippe Houdoin } dpc_module_info; 25*a5347f68SPhilippe Houdoin 26*a5347f68SPhilippe Houdoin 27*a5347f68SPhilippe Houdoin #ifdef __cplusplus 28*a5347f68SPhilippe Houdoin } 29*a5347f68SPhilippe Houdoin #endif 30*a5347f68SPhilippe Houdoin 31*a5347f68SPhilippe Houdoin #endif 32