Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2015-01-22 18:32:51 +0300
committerCorinna Vinschen <corinna@vinschen.de>2015-01-22 18:32:51 +0300
commitbdc179955635c0a814ba324ea263c875a6733cb4 (patch)
treef260dd30cb57d55241cae95eecb36008b6537cd0 /newlib
parent185784962a8f35695800dfeaa49da4a4209df6ad (diff)
* libc/sys/or1k/mlock.c: Fix dependency on libgloss.
Diffstat (limited to 'newlib')
-rw-r--r--newlib/ChangeLog4
-rw-r--r--newlib/libc/sys/or1k/mlock.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index e67c2cf87..845dfa54d 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,7 @@
+2015-01-22 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * libc/sys/or1k/mlock.c: Fix dependency on libgloss.
+
2015-01-21 Eric Botcazou <ebotcazou@adacore.com>
* configure.host: Add Visium support.
diff --git a/newlib/libc/sys/or1k/mlock.c b/newlib/libc/sys/or1k/mlock.c
index 660c3f087..a439da603 100644
--- a/newlib/libc/sys/or1k/mlock.c
+++ b/newlib/libc/sys/or1k/mlock.c
@@ -16,7 +16,7 @@
*/
#include <reent.h>
-#include <or1k-support.h>
+#include <stdint.h>
/* Lock calls from different cores, but allows recursive calls from the same
* core. The lock is not only atomic to other cores calling malloc, but also
@@ -36,6 +36,8 @@ volatile uint32_t _or1k_malloc_lock_cnt;
// The exception enable restore of the current mutex holder
volatile uint32_t _or1k_malloc_lock_restore;
+extern uint32_t or1k_sync_cas(void *address, uint32_t compare, uint32_t swap);
+
/**
* Recursive lock of the malloc
*/
@@ -59,7 +61,7 @@ void __malloc_lock(struct _reent *ptr) {
while (_or1k_malloc_lock != 0) {}
// .. and then try to set it atomically. As this may
// fail, we need to repeat this
- } while (or1k_sync_cas(&_or1k_malloc_lock, 0, id) != 0);
+ } while (or1k_sync_cas((void*) &_or1k_malloc_lock, 0, id) != 0);
}
// Store the TEE and IEE flags for later restore