summaryrefslogtreecommitdiff
path: root/Libraries/LibC
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibC')
-rw-r--r--Libraries/LibC/serenity.cpp11
-rw-r--r--Libraries/LibC/serenity.h3
2 files changed, 14 insertions, 0 deletions
diff --git a/Libraries/LibC/serenity.cpp b/Libraries/LibC/serenity.cpp
index 22756fe6a9..4d26facc60 100644
--- a/Libraries/LibC/serenity.cpp
+++ b/Libraries/LibC/serenity.cpp
@@ -16,4 +16,15 @@ int module_unload(const char* name, size_t name_length)
__RETURN_WITH_ERRNO(rc, rc, -1);
}
+int profiling_enable(pid_t pid)
+{
+ int rc = syscall(SC_profiling_enable, pid);
+ __RETURN_WITH_ERRNO(rc, rc, -1);
+}
+
+int profiling_disable(pid_t pid)
+{
+ int rc = syscall(SC_profiling_disable, pid);
+ __RETURN_WITH_ERRNO(rc, rc, -1);
+}
}
diff --git a/Libraries/LibC/serenity.h b/Libraries/LibC/serenity.h
index 26e0ebc5b6..6aa6026185 100644
--- a/Libraries/LibC/serenity.h
+++ b/Libraries/LibC/serenity.h
@@ -41,4 +41,7 @@ __BEGIN_DECLS
int module_load(const char* path, size_t path_length);
int module_unload(const char* name, size_t name_length);
+int profiling_enable(pid_t);
+int profiling_disable(pid_t);
+
__END_DECLS