aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/pyhelper.h
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-04-07 19:05:04 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-04-07 19:05:04 -0400
commit657c908f88598700985facf9fee37e875fbc276d (patch)
tree5ab7dfe336979f1f7916f5de96c067780afc6d9c /klippy/pyhelper.h
parentd7a0e22d59becb3467f3069dd6030b1e7b4e0fb9 (diff)
downloadkutter-657c908f88598700985facf9fee37e875fbc276d.tar.gz
kutter-657c908f88598700985facf9fee37e875fbc276d.tar.xz
kutter-657c908f88598700985facf9fee37e875fbc276d.zip
stepcompress: Modify check_expand() into check_push()
Add the new item at the same time as checking if there is space in the queue. Also, update the default optimization level of c_helper.so to O2 to improve the compiled code layout. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/pyhelper.h')
-rw-r--r--klippy/pyhelper.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/klippy/pyhelper.h b/klippy/pyhelper.h
index 1042214b..d564c78b 100644
--- a/klippy/pyhelper.h
+++ b/klippy/pyhelper.h
@@ -1,6 +1,9 @@
#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 *));