Browse Source

LibC: Expose new `profiling_free_buffer(..)` syscall.

Expose the new `profiling_free_buffer` syscall to user space.
Brian Gianforcaro 4 years ago
parent
commit
3e87e43f9d
2 changed files with 7 additions and 0 deletions
  1. 6 0
      Userland/Libraries/LibC/serenity.cpp
  2. 1 0
      Userland/Libraries/LibC/serenity.h

+ 6 - 0
Userland/Libraries/LibC/serenity.cpp

@@ -62,6 +62,12 @@ int profiling_disable(pid_t pid)
     __RETURN_WITH_ERRNO(rc, rc, -1);
 }
 
+int profiling_free_buffer(pid_t pid)
+{
+    int rc = syscall(SC_profiling_free_buffer, pid);
+    __RETURN_WITH_ERRNO(rc, rc, -1);
+}
+
 int futex(uint32_t* userspace_address, int futex_op, uint32_t value, const struct timespec* timeout, uint32_t* userspace_address2, uint32_t value3)
 {
     int rc;

+ 1 - 0
Userland/Libraries/LibC/serenity.h

@@ -39,6 +39,7 @@ int module_unload(const char* name, size_t name_length);
 
 int profiling_enable(pid_t);
 int profiling_disable(pid_t);
+int profiling_free_buffer(pid_t);
 
 #define THREAD_PRIORITY_MIN 1
 #define THREAD_PRIORITY_LOW 10