Debian Codegraph @

runtime/transport/control.h

raw
1 /* -*- linux-c -*-
2 *
3 * control channel header
4 * Copyright (C) 2009-2018 Red Hat Inc.
5 *
6 * This file is part of systemtap, and is free software. You can
7 * redistribute it and/or modify it under the terms of the GNU General
8 * Public License (GPL); either version 2, or (at your option) any
9 * later version.
10 */
11
12 #ifndef _CONTROL_H_
13 #define _CONTROL_H_
14
15 #include <linux/spinlock.h>
16 #include <linux/list.h>
17 #include "../stp_helper_lock.h"
18
19 static struct list_head _stp_ctl_ready_q;
20 static stp_spinlock_t _stp_ctl_ready_lock;
21 static wait_queue_head_t _stp_ctl_wq;
22
23 struct _stp_buffer {
24 struct list_head list;
25 int len;
26 int type;
27 char buf[STP_CTL_BUFFER_SIZE];
28 };
29
30 static struct file_operations _stp_ctl_fops_cmd;
31 #ifdef STAPCONF_PROC_OPS
32 static struct proc_ops _stp_ctl_proc_ops_cmd;
33 #endif
34
35 static int _stp_ctl_send(int type, void *data, unsigned len);
36 static int _stp_ctl_send_notify(int type, void *data, unsigned len);
37
38 static void _stp_ctl_log_werr(const char *logtype, size_t logtype_len,
39 const char *fmt, va_list args)
40 __attribute((format(printf, 3, 0)));
41
42 static int _stp_ctl_write_fs(int type, void *data, unsigned len);
43
44 static int _stp_register_ctl_channel(void);
45 static void _stp_unregister_ctl_channel(void);
46
47 static int _stp_register_ctl_channel_fs(void);
48 static void _stp_unregister_ctl_channel_fs(void);
49
50 #endif /* _CONTROL_H_ */