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