25 #ifndef __RTNET_RTPC_H_ 26 #define __RTNET_RTPC_H_ 28 #include <linux/init.h> 30 #include <rtnet_internal.h> 35 typedef int (*rtpc_proc)(
struct rt_proc_call *call);
36 typedef void (*rtpc_copy_back_proc)(
struct rt_proc_call *call,
38 typedef void (*rtpc_cleanup_proc)(
void *priv_data);
41 struct list_head list_entry;
46 wait_queue_head_t call_wq;
47 rtpc_cleanup_proc cleanup_handler;
48 char priv_data[0] __attribute__ ((aligned(8)));
51 #define CALL_PENDING 1000 54 int rtnet_rtpc_dispatch_call(rtpc_proc rt_proc,
unsigned int timeout,
55 void *priv_data,
size_t priv_data_size,
56 rtpc_copy_back_proc copy_back_handler,
57 rtpc_cleanup_proc cleanup_handler);
60 void rtnet_rtpc_complete_call(
struct rt_proc_call *call,
int result);
61 void rtnet_rtpc_complete_call_nrt(
struct rt_proc_call *call,
int result);
63 #define rtpc_dispatch_call rtnet_rtpc_dispatch_call 64 #define rtpc_complete_call rtnet_rtpc_complete_call 65 #define rtpc_complete_call_nrt rtnet_rtpc_complete_call_nrt 67 #define rtpc_get_priv(call, type) (type *)(call->priv_data) 68 #define rtpc_get_result(call) call->result 69 #define rtpc_set_result(call, new_result) call->result = new_result 70 #define rtpc_set_cleanup_handler(call, handler) \ 71 call->cleanup_handler = handler; 74 int __init rtpc_init(
void);
75 void rtpc_cleanup(
void);
Copyright © 2011 Gilles Chanteperdrix gilles.chanteperdrix@xenomai.org.
Definition: atomic.h:24