未验证 提交 371a9129 编写于 作者: O openharmony_ci 提交者: Gitee

!54 fix: add support for newlib

Merge pull request !54 from Harylee/qemu
...@@ -56,7 +56,7 @@ STATIC VOID BufferInsert(CHAR *buf, size_t bufLen, size_t positions, CHAR data) ...@@ -56,7 +56,7 @@ STATIC VOID BufferInsert(CHAR *buf, size_t bufLen, size_t positions, CHAR data)
return; return;
} }
if (memmove_s(&buf[positions + 1], bufLen - positions - 1, &buf[positions], bufLen - positions - 1) != EOK) { if (memmove_s(&buf[positions + 1], bufLen - positions - 1, &buf[positions], bufLen - positions - 1) != EOK) {
dprintf("%s falied \n", __FUNCTION__); PRINTK("%s falied \n", __FUNCTION__);
return; return;
} }
......
...@@ -77,7 +77,7 @@ callout_reset(struct callout *c, int to_ticks, void (*func)(void *), void *arg) ...@@ -77,7 +77,7 @@ callout_reset(struct callout *c, int to_ticks, void (*func)(void *), void *arg)
if (c != NULL) { if (c != NULL) {
callout_stop(c); callout_stop(c);
LOS_SpinLockSave(&c->lock, &int_save); LOS_SpinLockSave(&c->lock, (unsigned int *)&int_save);
c->callout_data.func = (timer_func)func; c->callout_data.func = (timer_func)func;
c->callout_data.arg = arg; c->callout_data.arg = arg;
...@@ -103,7 +103,7 @@ callout_stop(struct callout *c) ...@@ -103,7 +103,7 @@ callout_stop(struct callout *c)
{ {
uint32_t int_save; uint32_t int_save;
if (c != NULL) { if (c != NULL) {
LOS_SpinLockSave(&c->lock, &int_save); LOS_SpinLockSave(&c->lock, (unsigned int *)&int_save);
(void)LOS_SwtmrDelete(c->timer_id); (void)LOS_SwtmrDelete(c->timer_id);
LOS_SpinUnlockRestore(&c->lock, int_save); LOS_SpinUnlockRestore(&c->lock, int_save);
} }
......
...@@ -883,4 +883,9 @@ ...@@ -883,4 +883,9 @@
#define __guarded_by(x) __lock_annotate(guarded_by(x)) #define __guarded_by(x) __lock_annotate(guarded_by(x))
#define __pt_guarded_by(x) __lock_annotate(pt_guarded_by(x)) #define __pt_guarded_by(x) __lock_annotate(pt_guarded_by(x))
#ifdef LOSCFG_LIBC_NEWLIB
#undef _SYS_CDEFS_H_
#include_next <sys/cdefs.h>
#endif
#endif /* !_SYS_CDEFS_H_ */ #endif /* !_SYS_CDEFS_H_ */
...@@ -39,6 +39,9 @@ ...@@ -39,6 +39,9 @@
#include <sys/types.h> #include <sys/types.h>
#include <los_memory.h> #include <los_memory.h>
#ifdef LOSCFG_LIBC_NEWLIB
#include <malloc.h>
#endif
#define M_NOWAIT 0x0001 /* do not block */ #define M_NOWAIT 0x0001 /* do not block */
#define M_WAITOK 0x0002 /* ok to block */ #define M_WAITOK 0x0002 /* ok to block */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册