From: ljsebald <ljs...@us...> - 2023-08-28 22:42:03
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 2c79c740e9fb3809158076ded9efd25b50b3b32e (commit) via 4405103f6b9e4773adddf281c4f81f4044dcc44b (commit) via b7732a0c831573fd3f525af18b3040a11e051664 (commit) via b19e2dfd133235754b431819fa9a8b812247ec75 (commit) via 2107fca51b5974f2d8349aee0ae0b19836bb1e0e (commit) via 6619915118201759ef6d98bccc3957e306c1c83c (commit) from d8c5c508c5283f0bc28c81b92b8e253d6716cc35 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2c79c740e9fb3809158076ded9efd25b50b3b32e Merge: d8c5c50 4405103 Author: Lawrence Sebald <ljs...@us...> Date: Mon Aug 28 18:40:06 2023 -0400 Merge pull request #282 from KallistiOS/cplusplus-apparently-hates-optimizations-based-on-pointers C++ apparently hates aliasing-related pointer optimizations. commit 4405103f6b9e4773adddf281c4f81f4044dcc44b Author: Lawrence Sebald <ljs...@us...> Date: Mon Aug 28 17:17:24 2023 -0400 Update CHANGELOG again commit b7732a0c831573fd3f525af18b3040a11e051664 Author: Lawrence Sebald <ljs...@us...> Date: Mon Aug 28 17:13:37 2023 -0400 Oops... We already have __RESTRICT. Move it to a more appropriate place and use it. commit b19e2dfd133235754b431819fa9a8b812247ec75 Author: Lawrence Sebald <ljs...@us...> Date: Mon Aug 28 17:05:00 2023 -0400 Might as well make this work if you ask for c89/c90/ansi-c as well... commit 2107fca51b5974f2d8349aee0ae0b19836bb1e0e Author: Lawrence Sebald <ljs...@us...> Date: Mon Aug 28 16:50:30 2023 -0400 Update CHANGELOG commit 6619915118201759ef6d98bccc3957e306c1c83c Author: Lawrence Sebald <ljs...@us...> Date: Mon Aug 28 16:48:45 2023 -0400 Add definition of restrict to <kos/cdefs.h> for C++. ----------------------------------------------------------------------- Summary of changes: doc/CHANGELOG | 1 + include/kos/cdefs.h | 14 ++++++++++++++ include/kos/thread.h | 6 +++--- include/sys/_types.h | 11 ----------- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index df01c9b..fc8e1a7 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -184,6 +184,7 @@ KallistiOS version 2.1.0 ----------------------------------------------- - DC VMU driver update for date/time, buttons, buzzer, and docs [FG] - DC Add spinlock_trylock macro [LS] - *** Simplify kthread_once_t into a simple variable rather than a struct [LS] +- *** Move definition of __RESTRICT from <sys/_types.h> to <kos/cdefs.h> [LS] KallistiOS version 2.0.0 ----------------------------------------------- - DC Broadband Adapter driver fixes [Megan Potter == MP] diff --git a/include/kos/cdefs.h b/include/kos/cdefs.h index a253679..a2f222d 100644 --- a/include/kos/cdefs.h +++ b/include/kos/cdefs.h @@ -115,4 +115,18 @@ /* GCC macros for special cases */ /* #if __GNUC__ == */ +#ifndef __RESTRICT +#if (__STDC_VERSION__ >= 199901L) +#define __RESTRICT restrict +#elif defined(__GNUC__) || defined(__GNUG__) +#define __RESTRICT __restrict__ +#else /* < C99 and not GCC */ +#define __RESTRICT +#endif +#endif /* !__RESTRICT */ + +#ifndef __GNUC__ +#define __extension__ +#endif + #endif /* __KOS_CDEFS_H */ diff --git a/include/kos/thread.h b/include/kos/thread.h index 8464c7d..d61a4cd 100644 --- a/include/kos/thread.h +++ b/include/kos/thread.h @@ -386,7 +386,7 @@ kthread_t *thd_create(int detach, void *(*routine)(void *param), void *param); \sa thd_create, thd_destroy */ -kthread_t *thd_create_ex(const kthread_attr_t *restrict attr, +kthread_t *thd_create_ex(const kthread_attr_t *__RESTRICT attr, void *(*routine)(void *param), void *param); /** \brief Brutally kill the given thread. @@ -520,7 +520,7 @@ const char *thd_get_label(kthread_t *thd); \sa thd_get_label */ -void thd_set_label(kthread_t *thd, const char *restrict label); +void thd_set_label(kthread_t *thd, const char *__RESTRICT label); /** \brief Retrieve the thread's current working directory. \ingroup threads @@ -553,7 +553,7 @@ const char *thd_get_pwd(kthread_t *thd); \sa thd_get_pwd */ -void thd_set_pwd(kthread_t *thd, const char *restrict pwd); +void thd_set_pwd(kthread_t *thd, const char *__RESTRICT pwd); /** \brief Retrieve a pointer to the thread errno. \ingroup threads diff --git a/include/sys/_types.h b/include/sys/_types.h index 42ab393..bf26c23 100644 --- a/include/sys/_types.h +++ b/include/sys/_types.h @@ -203,16 +203,6 @@ typedef _CLOCK_T_ __clock_t; /* Include stuff to make pthreads work as well. */ #include <sys/_pthread.h> -#ifndef __RESTRICT -#if (__STDC_VERSION__ >= 199901L) -#define __RESTRICT restrict -#elif defined(__GNUC__) || defined(__GNUG__) -#define __RESTRICT __restrict -#else /* < C99 and not GCC */ -#define __RESTRICT -#endif -#endif /* !__RESTRICT */ - #if __GNUC_MINOR__ > 95 || __GNUC__ >= 3 typedef __builtin_va_list __va_list; #else @@ -231,4 +221,3 @@ __END_DECLS #ifdef _STDLIB_H_ #include <kos/stdlib.h> #endif - hooks/post-receive -- A pseudo Operating System for the Dreamcast. |