aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/chelper/pyhelper.h
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-04-30 11:22:16 -0400
committerKevin O'Connor <kevin@koconnor.net>2018-04-30 11:44:53 -0400
commit15248706ae3950ce89ea595c72349b3738983f41 (patch)
treea0bc14c73de7a0844c4a3a43381bc93334fa3dbb /klippy/chelper/pyhelper.h
parent8e1b516eb6e47eb3aa295f2b872fa60a530274e1 (diff)
downloadkutter-15248706ae3950ce89ea595c72349b3738983f41.tar.gz
kutter-15248706ae3950ce89ea595c72349b3738983f41.tar.xz
kutter-15248706ae3950ce89ea595c72349b3738983f41.zip
chelper: Move the host C code to a new klippy/chelper/ directory
Move the C code out of the main klippy/ directory and into its own directory. This reduces the clutter in the main klippy directory. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/chelper/pyhelper.h')
-rw-r--r--klippy/chelper/pyhelper.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/klippy/chelper/pyhelper.h b/klippy/chelper/pyhelper.h
new file mode 100644
index 00000000..d564c78b
--- /dev/null
+++ b/klippy/chelper/pyhelper.h
@@ -0,0 +1,14 @@
+#ifndef PYHELPER_H
+#define PYHELPER_H
+
+#define likely(x) __builtin_expect(!!(x), 1)
+#define unlikely(x) __builtin_expect(!!(x), 0)
+
+double get_monotonic(void);
+struct timespec fill_time(double time);
+void set_python_logging_callback(void (*func)(const char *));
+void errorf(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
+void report_errno(char *where, int rc);
+char *dump_string(char *outbuf, int outbuf_size, char *inbuf, int inbuf_size);
+
+#endif // pyhelper.h