From: kosmirror <kos...@us...> - 2025-08-06 14:35:35
|
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 2d510bcb1402d0af81000cb5eb1f6bcf7cb29d59 (commit) via d8e3229c13744def2876206ffa68a7effbb699b1 (commit) from f68aa6ceeb9a229bb964091fb8786c88d3cd8d68 (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 2d510bcb1402d0af81000cb5eb1f6bcf7cb29d59 Author: QuzarDC <qu...@co...> Date: Tue Aug 5 16:19:40 2025 -0400 arch: Update to `__pure2` on `kos_get_{banner,license,authors}` This maps to the gcc function attribute `const` which is stricter than pure in that it guarantees it will have no observable effect other than to return a value and the value will not change. commit d8e3229c13744def2876206ffa68a7effbb699b1 Author: QuzarDC <qu...@co...> Date: Tue Aug 5 14:50:50 2025 -0400 mutex: Add `__pure` to `mutex_is_locked` prototype. This got lost when rebasing changes in #992 to take into account the changes in #1047 . ----------------------------------------------------------------------- Summary of changes: include/kos/mutex.h | 2 +- kernel/arch/dreamcast/include/arch/arch.h | 6 +++--- kernel/arch/dreamcast/kernel/banner.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/kos/mutex.h b/include/kos/mutex.h index 3fb273c6..c2f467e9 100644 --- a/include/kos/mutex.h +++ b/include/kos/mutex.h @@ -211,7 +211,7 @@ int mutex_lock_timed(mutex_t *m, int timeout) __nonnull_all; \retval 0 If the mutex is not currently locked \retval 1 If the mutex is currently locked */ -int mutex_is_locked(const mutex_t *m) __nonnull_all; +int __pure mutex_is_locked(const mutex_t *m) __nonnull_all; /** \brief Attempt to lock a mutex. diff --git a/kernel/arch/dreamcast/include/arch/arch.h b/kernel/arch/dreamcast/include/arch/arch.h index 972bbd6a..1f9d227c 100644 --- a/kernel/arch/dreamcast/include/arch/arch.h +++ b/kernel/arch/dreamcast/include/arch/arch.h @@ -340,7 +340,7 @@ int hardware_sys_mode(int *region); \return A pointer to the banner string. */ -const char * __pure kos_get_banner(void); +const char * __pure2 kos_get_banner(void); /** \brief Retrieve the license information for the compiled copy of KOS. \ingroup attribution @@ -351,7 +351,7 @@ const char * __pure kos_get_banner(void); \return A pointer to the license terms. */ -const char * __pure kos_get_license(void); +const char * __pure2 kos_get_license(void); /** \brief Retrieve a list of authors and the dates of their contributions. \ingroup attribution @@ -367,7 +367,7 @@ const char * __pure kos_get_license(void); \return A pointer to the authors' copyright information. */ -const char *__pure kos_get_authors(void); +const char *__pure2 kos_get_authors(void); /** \brief Dreamcast specific sleep mode function. \ingroup arch diff --git a/kernel/arch/dreamcast/kernel/banner.c b/kernel/arch/dreamcast/kernel/banner.c index d18a71dd..e7894b73 100644 --- a/kernel/arch/dreamcast/kernel/banner.c +++ b/kernel/arch/dreamcast/kernel/banner.c @@ -35,15 +35,15 @@ static const char license[] = "OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n" "SUCH DAMAGE."; -const char * __pure kos_get_banner(void) { +const char * __pure2 kos_get_banner(void) { __asm__ __volatile__("nop" : : "r"(license), "r"(authors)); return banner; } -const char * __pure kos_get_license(void) { +const char * __pure2 kos_get_license(void) { return license; } -const char * __pure kos_get_authors(void) { +const char * __pure2 kos_get_authors(void) { return authors; } hooks/post-receive -- A pseudo Operating System for the Dreamcast. |