aboutsummaryrefslogtreecommitdiff
path: root/vendor/zgui/libs/winpthreads/include/sched.h
diff options
context:
space:
mode:
authorNic Gaffney <gaffney_nic@protonmail.com>2024-06-12 21:15:52 -0500
committerNic Gaffney <gaffney_nic@protonmail.com>2024-06-12 21:15:52 -0500
commit963fae202108acd0498349e872e4811fa6c6aba0 (patch)
tree1a7d5b6ee837700819d8f6f5a2484342a0ab6ec1 /vendor/zgui/libs/winpthreads/include/sched.h
parent6084001df845815efd9c0eb712acf4fd9311ce36 (diff)
downloadparticle-sim-963fae202108acd0498349e872e4811fa6c6aba0.tar.gz
Added imgui for configuration
Diffstat (limited to 'vendor/zgui/libs/winpthreads/include/sched.h')
-rw-r--r--vendor/zgui/libs/winpthreads/include/sched.h83
1 files changed, 83 insertions, 0 deletions
diff --git a/vendor/zgui/libs/winpthreads/include/sched.h b/vendor/zgui/libs/winpthreads/include/sched.h
new file mode 100644
index 0000000..bf28487
--- /dev/null
+++ b/vendor/zgui/libs/winpthreads/include/sched.h
@@ -0,0 +1,83 @@
+/*
+ Copyright (c) 2011-2016 mingw-w64 project
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+*/
+
+#include <stddef.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <process.h>
+#include <limits.h>
+#include <signal.h>
+
+#include <sys/timeb.h>
+
+#ifndef WIN_PTHREADS_SCHED_H
+#define WIN_PTHREADS_SCHED_H
+
+#ifndef SCHED_OTHER
+/* Some POSIX realtime extensions, mostly stubbed */
+#define SCHED_OTHER 0
+#define SCHED_FIFO 1
+#define SCHED_RR 2
+#define SCHED_MIN SCHED_OTHER
+#define SCHED_MAX SCHED_RR
+
+struct sched_param {
+ int sched_priority;
+};
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(IN_WINPTHREAD)
+# if defined(DLL_EXPORT) && !defined(WINPTHREAD_EXPORT_ALL_DEBUG)
+# define WINPTHREAD_SCHED_API __declspec(dllexport) /* building the DLL */
+# else
+# define WINPTHREAD_SCHED_API /* building the static library */
+# endif
+#else
+# if defined(WINPTHREADS_USE_DLLIMPORT)
+# define WINPTHREAD_SCHED_API __declspec(dllimport) /* user wants explicit `dllimport` */
+# else
+# define WINPTHREAD_SCHED_API /* the default; auto imported in case of DLL */
+# endif
+#endif
+
+WINPTHREAD_SCHED_API int sched_yield(void);
+WINPTHREAD_SCHED_API int sched_get_priority_min(int pol);
+WINPTHREAD_SCHED_API int sched_get_priority_max(int pol);
+WINPTHREAD_SCHED_API int sched_getscheduler(pid_t pid);
+WINPTHREAD_SCHED_API int sched_setscheduler(pid_t pid, int pol, const struct sched_param *param);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#ifndef sched_rr_get_interval
+#define sched_rr_get_interval(_p, _i) \
+ ( errno = ENOTSUP, (int) -1 )
+#endif
+
+#endif /* WIN_PTHREADS_SCHED_H */