summaryrefslogtreecommitdiff
path: root/include/kernel
diff options
context:
space:
mode:
authorReiko Asakura2020-07-25 02:39:11 -0400
committerReiko Asakura2020-07-25 02:39:11 -0400
commit4f681eaea2aa1c7b0f85f981cc467a5d805bf88d (patch)
tree43197d0291e138fa0d8205253b49c7ceed1d9547 /include/kernel
parentMerge Vitasdk (diff)
downloadvds-libraries-4f681eaea2aa1c7b0f85f981cc467a5d805bf88d.tar.gz
Add all remaining NIDs in SceSysclibForDriver
Diffstat (limited to 'include/kernel')
-rw-r--r--include/kernel/kernel/sysclib.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/include/kernel/kernel/sysclib.h b/include/kernel/kernel/sysclib.h
new file mode 100644
index 0000000..c255e56
--- /dev/null
+++ b/include/kernel/kernel/sysclib.h
@@ -0,0 +1,41 @@
+#ifndef _DOLCESDK_PSP2KERN_KERNEL_SYSCLIB_H_
+#define _DOLCESDK_PSP2KERN_KERNEL_SYSCLIB_H_
+
+#include <psp2/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Left shift with only register operations (no memory access).
+ */
+SceInt64 lshift(SceInt64 value, int shift);
+
+/**
+ * Arithmetic right shift with only register operations (no memory access).
+ */
+SceInt64 rshift(SceInt64 value, int shift);
+
+/**
+ * Arithmetic right shift with only register operations (no memory access).
+ * May be faster than rshift for shift less than 32.
+ */
+SceInt64 rshift_fast(SceInt64 value, int shift);
+
+/**
+ * Like memcmp but checks all n bytes of s1 and s2 without early return.
+ */
+int memcmp_consttime(const void *s1, const void *s2, size_t n);
+
+/**
+ * Like strncpy but puts 0 or 1 zero bytes after copying src to dest,
+ * rather than filling dest with zero bytes up to n.
+ */
+char *strncpy_fast(char *dest, const char *src, size_t n);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _DOLCESDK_PSP2KERN_KERNEL_SYSCLIB_H_ */