summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC
diff options
context:
space:
mode:
authorGunnar Beutner <gunnar@beutner.name>2021-04-14 04:29:39 +0200
committerAndreas Kling <kling@serenityos.org>2021-04-14 13:13:06 +0200
commitea6d0aa1d47175c248368292bb2e687c73e1d37a (patch)
treecdfc439d7895ef96a9d60f113ff607fadecedcd2 /Userland/Libraries/LibC
parentf2ff8f2658e0c740a12d1ef1674a4a64bcd7a461 (diff)
downloadserenity-ea6d0aa1d47175c248368292bb2e687c73e1d37a.zip
LibPthread: Implement semaphore functions
Diffstat (limited to 'Userland/Libraries/LibC')
-rw-r--r--Userland/Libraries/LibC/CMakeLists.txt1
-rw-r--r--Userland/Libraries/LibC/semaphore.cpp65
-rw-r--r--Userland/Libraries/LibC/semaphore.h46
3 files changed, 0 insertions, 112 deletions
diff --git a/Userland/Libraries/LibC/CMakeLists.txt b/Userland/Libraries/LibC/CMakeLists.txt
index 1e2b7c4e83..56454f5609 100644
--- a/Userland/Libraries/LibC/CMakeLists.txt
+++ b/Userland/Libraries/LibC/CMakeLists.txt
@@ -24,7 +24,6 @@ set(LIBC_SOURCES
qsort.cpp
scanf.cpp
sched.cpp
- semaphore.cpp
serenity.cpp
signal.cpp
spawn.cpp
diff --git a/Userland/Libraries/LibC/semaphore.cpp b/Userland/Libraries/LibC/semaphore.cpp
deleted file mode 100644
index 618c3335f0..0000000000
--- a/Userland/Libraries/LibC/semaphore.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2021, the SerenityOS developers.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <AK/Assertions.h>
-#include <semaphore.h>
-
-int sem_close(sem_t*)
-{
- VERIFY_NOT_REACHED();
-}
-int sem_destroy(sem_t*)
-{
- VERIFY_NOT_REACHED();
-}
-int sem_getvalue(sem_t*, int*)
-{
- VERIFY_NOT_REACHED();
-}
-int sem_init(sem_t*, int, unsigned int)
-{
- VERIFY_NOT_REACHED();
-}
-sem_t* sem_open(const char*, int, ...)
-{
- VERIFY_NOT_REACHED();
-}
-int sem_post(sem_t*)
-{
- VERIFY_NOT_REACHED();
-}
-int sem_trywait(sem_t*)
-{
- VERIFY_NOT_REACHED();
-}
-int sem_unlink(const char*)
-{
- VERIFY_NOT_REACHED();
-}
-int sem_wait(sem_t*)
-{
- VERIFY_NOT_REACHED();
-}
diff --git a/Userland/Libraries/LibC/semaphore.h b/Userland/Libraries/LibC/semaphore.h
deleted file mode 100644
index 4d0444bef5..0000000000
--- a/Userland/Libraries/LibC/semaphore.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2021, the SerenityOS developers.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-__BEGIN_DECLS
-
-typedef int sem_t;
-
-int sem_close(sem_t*);
-int sem_destroy(sem_t*);
-int sem_getvalue(sem_t*, int*);
-int sem_init(sem_t*, int, unsigned int);
-sem_t* sem_open(const char*, int, ...);
-int sem_post(sem_t*);
-int sem_trywait(sem_t*);
-int sem_unlink(const char*);
-int sem_wait(sem_t*);
-
-__END_DECLS