[haiku-commits] haiku: hrev53185 - headers/posix

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 15 Jun 2019 12:16:15 -0400 (EDT)

hrev53185 adds 2 changesets to branch 'master'
old head: 7b1178998ddedc527ebc9cebc231088b41ea9975
new head: 4d0fd41d249412cc8b544ecdde7b4e8223fd0390
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=4d0fd41d2494+%5E7b1178998dde

----------------------------------------------------------------------------

03c14d29896a: stdlib.h: Add noreturn attribute to exit and _Exit.
  
  Fixes #15110.

4d0fd41d2494: kernel/lock.h: Reorder function declarations so the comment is 
correct.

                              [ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]

----------------------------------------------------------------------------

2 files changed, 3 insertions(+), 3 deletions(-)
headers/posix/stdlib.h        | 4 ++--
headers/private/kernel/lock.h | 2 +-

############################################################################

Commit:      03c14d29896a98c518c4a4dbfe00bff9ffeb8875
URL:         https://git.haiku-os.org/haiku/commit/?id=03c14d29896a
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Sat Jun 15 16:14:06 2019 UTC

Ticket:      https://dev.haiku-os.org/ticket/15110

stdlib.h: Add noreturn attribute to exit and _Exit.

Fixes #15110.

----------------------------------------------------------------------------

diff --git a/headers/posix/stdlib.h b/headers/posix/stdlib.h
index a1c6a57cc8..eb1d02398d 100644
--- a/headers/posix/stdlib.h
+++ b/headers/posix/stdlib.h
@@ -55,8 +55,8 @@ extern void           *realloc(void *oldPointer, size_t 
newSize);
 extern void            abort(void);
 extern int             atexit(void (*func)(void));
 extern int             atfork(void (*func)(void));
-extern void            exit(int);
-extern void            _Exit(int);
+extern void            exit(int) __attribute__((noreturn));
+extern void            _Exit(int) __attribute__((noreturn));
 
 /* misc functions */
 extern char            *realpath(const char *path, char *resolved);

############################################################################

Revision:    hrev53185
Commit:      4d0fd41d249412cc8b544ecdde7b4e8223fd0390
URL:         https://git.haiku-os.org/haiku/commit/?id=4d0fd41d2494
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Sat Jun 15 16:14:49 2019 UTC

kernel/lock.h: Reorder function declarations so the comment is correct.

----------------------------------------------------------------------------

diff --git a/headers/private/kernel/lock.h b/headers/private/kernel/lock.h
index 004a0b5fb0..bcc53c54d9 100644
--- a/headers/private/kernel/lock.h
+++ b/headers/private/kernel/lock.h
@@ -137,8 +137,8 @@ extern void mutex_init(mutex* lock, const char* name);
        // name is *not* cloned nor freed in mutex_destroy()
 extern void mutex_init_etc(mutex* lock, const char* name, uint32 flags);
 extern void mutex_destroy(mutex* lock);
-extern status_t mutex_switch_lock(mutex* from, mutex* to);
 extern void mutex_transfer_lock(mutex* lock, thread_id thread);
+extern status_t mutex_switch_lock(mutex* from, mutex* to);
        // Unlocks "from" and locks "to" such that unlocking and starting to 
wait
        // for the lock is atomically. I.e. if "from" guards the object "to" 
belongs
        // to, the operation is safe as long as "from" is held while destroying


Other related posts:

  • » [haiku-commits] haiku: hrev53185 - headers/posix - waddlesplash