List of commits:
Subject Hash Author Date (UTC)
block signals 91772917669645b5634563d0c06e361c87cf3e84 Sylvain BERTRAND 2011-12-09 17:04:34
initial commit 5310fde2d021e3505f8f1d5d9091726c236967ec Sylvain BERTRAND 2011-12-07 11:29:18
Commit 91772917669645b5634563d0c06e361c87cf3e84 - block signals
Author: Sylvain BERTRAND
Author date (UTC): 2011-12-09 17:04
Committer name: Sylvain BERTRAND
Committer date (UTC): 2011-12-09 17:04
Parent(s): 5310fde2d021e3505f8f1d5d9091726c236967ec
Signer:
Signing key:
Signing status: N
Tree: e5d4013e9d985e678cea924dbaaa1acb3c99b7ff
File Lines added Lines deleted
init.c 19 7
modules.c 1 0
ulinux/arch 0 1
ulinux/archs/x86_64/signal/signal.h 6 3
File init.c changed (mode: 100644) (index b8a86e9..60a0113)
11 11 #include <ulinux/file.h> #include <ulinux/file.h>
12 12 #include <ulinux/stat.h> #include <ulinux/stat.h>
13 13 #include <ulinux/mmap.h> #include <ulinux/mmap.h>
14 #include <ulinux/signal/signal.h>
14 15
15 16 #include <stdarg.h> #include <stdarg.h>
16 17 #include <ulinux/utils/ascii/string/vsprintf.h> #include <ulinux/utils/ascii/string/vsprintf.h>
 
... ... k_u8 *g_dprintf_buf;
24 25 k_i g_console; k_i g_console;
25 26 #endif #endif
26 27
28 static void sigs_setup(void)
29 {
30 k_ul mask=(~0);
31 k_l r=sysc(rt_sigprocmask,4,K_SIG_BLOCK,&mask,0,sizeof(mask));
32 if(K_ISERR(r)){
33 OUTC(PRE "ERROR:unable to block all signals (except KILL and STOP ;) )\n");
34 sysc(exit_group,1,-1);
35 }
36 }
37
27 38 void _start(void) void _start(void)
28 39 { {
29 40 # ifdef DEBUG # ifdef DEBUG
30 k_l r=sysc(open,3,"/dev/console",K_O_WRONLY,0);
31 if(K_ISERR(r)) sysc(exit_group,1,-1);
32 g_console=(k_i)r;
33 r=sysc(mmap,6,0, K_PAGE_SIZE, K_PROT_READ|K_PROT_WRITE,
41 k_l rl=sysc(open,3,"/dev/console",K_O_WRONLY,0);
42 if(K_ISERR(rl)) sysc(exit_group,1,-1);
43 g_console=(k_i)rl;
44 rl=sysc(mmap,6,0, K_PAGE_SIZE, K_PROT_READ|K_PROT_WRITE,
34 45 K_MAP_PRIVATE|K_MAP_ANONYMOUS|K_MAP_POPULATE,0,0); K_MAP_PRIVATE|K_MAP_ANONYMOUS|K_MAP_POPULATE,0,0);
35 if(K_ISERR(r)){
36 OUTC(PRE "ERROR: unable to mmap memory for formatted output\n");
46 if(K_ISERR(rl)){
47 OUTC(PRE "ERROR:unable to mmap a memory page for formatted output\n");
37 48 sysc(exit_group,1,-1); sysc(exit_group,1,-1);
38 49 } }
39 g_dprintf_buf=(k_u8*)r;//just one page should be enough for formatted output
50 g_dprintf_buf=(k_u8*)rl;//just one page should be enough for formatted output
40 51 # endif # endif
52 sigs_setup();
41 53 modules_load(); modules_load();
42 54 sysc(exit_group,1,0); sysc(exit_group,1,0);
43 55 } }
File modules.c changed (mode: 100644) (index 5c828b2..63757dd)
20 20 #include "globals.h" #include "globals.h"
21 21 #include "modules_list.h" #include "modules_list.h"
22 22
23
23 24 static void module_load(k_u8 *m) static void module_load(k_u8 *m)
24 25 { {
25 26 k_l fd=sysc(open,3,m,K_O_RDONLY,0); k_l fd=sysc(open,3,m,K_O_RDONLY,0);
File ulinux/arch deleted (index 6e4e80d..0000000)
1 archs/x86_64
File ulinux/archs/x86_64/signal/signal.h changed (mode: 100644) (index 58a3d19..91a135a)
1 //**********************************************************************************************
1 //******************************************************************************
2 2 //*this code is protected by the GNU affero GPLv3 //*this code is protected by the GNU affero GPLv3
3 //*author:Sylvain BERTRAND (sylvain.bertrand AT gmail dot com)
4 //**********************************************************************************************
3 //*author:Sylvain BERTRAND <sylvain.bertrand AT gmail dot com>
4 //* <digital.ragnarok AT gmail dot com>
5 //******************************************************************************
5 6 #ifndef ULINUX_ARCH_SIGNAL_SIGNAL_H #ifndef ULINUX_ARCH_SIGNAL_SIGNAL_H
6 7 #define ULINUX_ARCH_SIGNAL_SIGNAL_H #define ULINUX_ARCH_SIGNAL_SIGNAL_H
7 8 #define K_SIGHUP 1 #define K_SIGHUP 1
 
38 39 #define K_SIGPWR 30 #define K_SIGPWR 30
39 40 #define K_SIGSYS 31 #define K_SIGSYS 31
40 41 #define K_SIGUNUSED 31 #define K_SIGUNUSED 31
42 #define K_SIGRTMIN 32
43 #define K_SIGRTMAX 64
41 44 #endif #endif
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/sylware/cinitramfs

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/sylware/cinitramfs

Clone this repository using git:
git clone git://git.rocketgit.com/user/sylware/cinitramfs

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main