mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:32:46 +00:00 
			
		
		
		
	Kernel: Add support for SA_SIGINFO
We currently don't really populate most of the fields, but that can wait :^)
This commit is contained in:
		
							parent
							
								
									585054d68b
								
							
						
					
					
						commit
						4bd01b7fe9
					
				
					 12 changed files with 408 additions and 195 deletions
				
			
		
							
								
								
									
										60
									
								
								Kernel/API/POSIX/ucontext.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								Kernel/API/POSIX/ucontext.h
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,60 @@ | |||
| /*
 | ||||
|  * Copyright (c) 2022, Ali Mohammad Pur <mpfard@serenityos.org> | ||||
|  * | ||||
|  * SPDX-License-Identifier: BSD-2-Clause | ||||
|  */ | ||||
| 
 | ||||
| #pragma once | ||||
| 
 | ||||
| #include <Kernel/API/POSIX/sys/types.h> | ||||
| #include <Kernel/Arch/mcontext.h> | ||||
| 
 | ||||
| #ifdef __cplusplus | ||||
| extern "C" { | ||||
| #endif | ||||
| 
 | ||||
| typedef struct __mcontext mcontext_t; | ||||
| 
 | ||||
| typedef struct __ucontext { | ||||
|     struct __ucontext* uc_link; | ||||
|     sigset_t uc_sigmask; | ||||
|     stack_t uc_stack; | ||||
|     mcontext_t uc_mcontext; | ||||
| } ucontext_t; | ||||
| 
 | ||||
| #define ILL_ILLOPC 0 | ||||
| #define ILL_ILLOPN 1 | ||||
| #define ILL_ILLADR 2 | ||||
| #define ILL_ILLTRP 3 | ||||
| #define ILL_PRVOPC 4 | ||||
| #define ILL_PRVREG 5 | ||||
| #define ILL_COPROC 6 | ||||
| #define ILL_BADSTK 7 | ||||
| 
 | ||||
| #define FPE_INTDIV 0 | ||||
| #define FPE_INTOVF 1 | ||||
| #define FPE_FLTDIV 2 | ||||
| #define FPE_FLTOVF 3 | ||||
| #define FPE_FLTUND 4 | ||||
| #define FPE_FLTRES 5 | ||||
| #define FPE_FLTINV 6 | ||||
| 
 | ||||
| #define SEGV_MAPERR 0 | ||||
| #define SEGV_ACCERR 1 | ||||
| 
 | ||||
| #define BUS_ADRALN 0 | ||||
| #define BUS_ADRERR 1 | ||||
| #define BUS_OBJERR 2 | ||||
| 
 | ||||
| #define TRAP_BRKPT 0 | ||||
| #define TRAP_TRACE 1 | ||||
| 
 | ||||
| #define SI_USER 0x40000000 | ||||
| #define SI_QUEUE 0x40000001 | ||||
| #define SI_TIMER 0x40000002 | ||||
| #define SI_ASYNCIO 0x40000003 | ||||
| #define SI_MESGQ 0x40000004 | ||||
| 
 | ||||
| #ifdef __cplusplus | ||||
| } | ||||
| #endif | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Ali Mohammad Pur
						Ali Mohammad Pur