af1c1a0a03
Pending DPCs at queue death time are now called too, to avoid possible leaks. Meanwhile, queue_dpc() will refuse to add another DPC and returns B_CANCELLED. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19798 a95241bf-73f2-0310-859d-f6bbb57e9c96
32 lines
600 B
C
32 lines
600 B
C
/* DPC module API
|
|
* Copyright 2007, Haiku Inc. All Rights Reserved.
|
|
* Distributed under the terms of the MIT License
|
|
*/
|
|
|
|
#ifndef _DPC_MODULE_H_
|
|
#define _DPC_MODULE_H_
|
|
|
|
#include <module.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define B_DPC_MODULE_NAME "generic/dpc/v1"
|
|
|
|
typedef void (*dpc_func) (void *arg);
|
|
|
|
typedef struct {
|
|
module_info info;
|
|
void * (*new_dpc_queue)(const char *name, long priority, int queue_size);
|
|
status_t (*delete_dpc_queue)(void *queue);
|
|
status_t (*queue_dpc)(void *queue, dpc_func dpc_name, void *arg);
|
|
} dpc_module_info;
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|