L4RE: get rid of __builtin_strlen usage

This commit is contained in:
Stefan Kalkowski
2017-05-30 09:03:57 +02:00
parent 2cf8f6f608
commit f3d44f2a42

View File

@@ -133,6 +133,13 @@ __kdebug_op_1(unsigned op, l4_mword_t val) L4_NOTHROW
return res; return res;
} }
L4_INLINE unsigned __kdebug_strlen(char const * s)
{
unsigned r = 0;
for (; s && *s; s++, r++);
return r;
}
L4_INLINE void enter_kdebug(char const *text) L4_NOTHROW L4_INLINE void enter_kdebug(char const *text) L4_NOTHROW
{ {
/* special case, enter without any text and use of the UTCB */ /* special case, enter without any text and use of the UTCB */
@@ -144,14 +151,14 @@ L4_INLINE void enter_kdebug(char const *text) L4_NOTHROW
return; return;
} }
__kdebug_text(L4_KDEBUG_ENTER, text, __builtin_strlen(text)); __kdebug_text(L4_KDEBUG_ENTER, text, __kdebug_strlen(text));
} }
L4_INLINE void outnstring(char const *text, unsigned len) L4_INLINE void outnstring(char const *text, unsigned len)
{ __kdebug_text(L4_KDEBUG_OUTNSTRING, text, len); } { __kdebug_text(L4_KDEBUG_OUTNSTRING, text, len); }
L4_INLINE void outstring(char const *text) L4_INLINE void outstring(char const *text)
{ outnstring(text, __builtin_strlen(text)); } { outnstring(text, __kdebug_strlen(text)); }
L4_INLINE void outchar(char c) L4_INLINE void outchar(char c)