summaryrefslogtreecommitdiff
path: root/spm/scmi/libc/memset.c
diff options
context:
space:
mode:
Diffstat (limited to 'spm/scmi/libc/memset.c')
-rw-r--r--spm/scmi/libc/memset.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/spm/scmi/libc/memset.c b/spm/scmi/libc/memset.c
new file mode 100644
index 0000000..03aa809
--- /dev/null
+++ b/spm/scmi/libc/memset.c
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <stddef.h>
+
+void *memset(void *dst, int val, size_t count)
+{
+ char *ptr = dst;
+
+ while (count--)
+ *ptr++ = val;
+
+ return dst;
+}