mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:12:43 +00:00 
			
		
		
		
	 04ba31b8c5
			
		
	
	
		04ba31b8c5
		
	
	
	
	
		
			
			These interfaces are broken for about 9 months, maybe longer than that. At this point, this is just a dead code nobody tests or tries to use, so let's remove it instead of keeping a stale code just for the sake of keeping it and hoping someone will fix it. To better justify this, I read that OpenBSD removed loadable kernel modules in 5.7 release (2014), mainly for the same reason we do - nobody used it so they had no good reason to maintain it. Still, OpenBSD had LKMs being effectively working, which is not the current state in our project for a long time. An arguably better approach to minimize the Kernel image size is to allow dropping drivers and features while compiling a new image.
		
			
				
	
	
		
			63 lines
		
	
	
	
		
			2 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			63 lines
		
	
	
	
		
			2 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <Kernel/API/POSIX/futex.h>
 | |
| #include <Kernel/API/POSIX/serenity.h>
 | |
| #include <stdio.h>
 | |
| #include <time.h>
 | |
| #include <unistd.h>
 | |
| 
 | |
| __BEGIN_DECLS
 | |
| 
 | |
| int disown(pid_t);
 | |
| 
 | |
| int profiling_enable(pid_t, uint64_t);
 | |
| int profiling_disable(pid_t);
 | |
| int profiling_free_buffer(pid_t);
 | |
| 
 | |
| int futex(uint32_t* userspace_address, int futex_op, uint32_t value, const struct timespec* timeout, uint32_t* userspace_address2, uint32_t value3);
 | |
| 
 | |
| static ALWAYS_INLINE int futex_wait(uint32_t* userspace_address, uint32_t value, const struct timespec* abstime, int clockid)
 | |
| {
 | |
|     int op;
 | |
| 
 | |
|     if (abstime) {
 | |
|         // NOTE: FUTEX_WAIT takes a relative timeout, so use FUTEX_WAIT_BITSET instead!
 | |
|         op = FUTEX_WAIT_BITSET;
 | |
|         if (clockid == CLOCK_REALTIME || clockid == CLOCK_REALTIME_COARSE)
 | |
|             op |= FUTEX_CLOCK_REALTIME;
 | |
|     } else {
 | |
|         op = FUTEX_WAIT;
 | |
|     }
 | |
|     return futex(userspace_address, op, value, abstime, nullptr, FUTEX_BITSET_MATCH_ANY);
 | |
| }
 | |
| 
 | |
| static ALWAYS_INLINE int futex_wake(uint32_t* userspace_address, uint32_t count)
 | |
| {
 | |
|     return futex(userspace_address, FUTEX_WAKE, count, NULL, NULL, 0);
 | |
| }
 | |
| 
 | |
| int purge(int mode);
 | |
| 
 | |
| int perf_event(int type, uintptr_t arg1, uintptr_t arg2);
 | |
| int perf_register_string(char const* string, size_t string_length);
 | |
| 
 | |
| int get_stack_bounds(uintptr_t* user_stack_base, size_t* user_stack_size);
 | |
| 
 | |
| int anon_create(size_t size, int options);
 | |
| 
 | |
| int serenity_readlink(const char* path, size_t path_length, char* buffer, size_t buffer_size);
 | |
| 
 | |
| int getkeymap(char* name_buffer, size_t name_buffer_size, uint32_t* map, uint32_t* shift_map, uint32_t* alt_map, uint32_t* altgr_map, uint32_t* shift_altgr_map);
 | |
| int setkeymap(const char* name, const uint32_t* map, uint32_t* const shift_map, const uint32_t* alt_map, const uint32_t* altgr_map, const uint32_t* shift_altgr_map);
 | |
| 
 | |
| uint16_t internet_checksum(const void* ptr, size_t count);
 | |
| 
 | |
| int emuctl(uintptr_t command, uintptr_t arg0, uintptr_t arg1);
 | |
| 
 | |
| __END_DECLS
 |