Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
relibc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
redox-os
relibc
Commits
284f51b4
Verified
Commit
284f51b4
authored
8 months ago
by
Jacob Lorentzon
Browse files
Options
Downloads
Patches
Plain Diff
Fix struct sigaction defintion.
parent
cf390d6a
No related branches found
No related tags found
1 merge request
!480
Refactor redox runtime and impl signals in userspace
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/bits/signal.h
+14
-0
14 additions, 0 deletions
include/bits/signal.h
src/header/signal/cbindgen.toml
+2
-1
2 additions, 1 deletion
src/header/signal/cbindgen.toml
src/header/signal/mod.rs
+5
-1
5 additions, 1 deletion
src/header/signal/mod.rs
with
21 additions
and
2 deletions
include/bits/signal.h
+
14
−
0
View file @
284f51b4
...
@@ -5,4 +5,18 @@
...
@@ -5,4 +5,18 @@
#define SIG_IGN ((void (*)(int))1)
#define SIG_IGN ((void (*)(int))1)
#define SIG_ERR ((void (*)(int))-1)
#define SIG_ERR ((void (*)(int))-1)
struct
siginfo
;
typedef
struct
siginfo
siginfo_t
;
typedef
unsigned
long
long
sigset_t
;
struct
sigaction
{
union
{
void
(
*
sa_handler
)(
int
);
void
(
*
sa_sigaction
)(
int
,
siginfo_t
*
,
void
*
);
};
unsigned
long
sa_flags
;
void
(
*
sa_restorer
)(
void
);
sigset_t
sa_mask
;
};
#endif // _BITS_SIGNAL_H
#endif // _BITS_SIGNAL_H
This diff is collapsed.
Click to expand it.
src/header/signal/cbindgen.toml
+
2
−
1
View file @
284f51b4
sys_includes
=
[
"stdint.h"
,
"sys/types.h"
,
"time.h"
,
"bits/pthread.h"
]
sys_includes
=
[
"bits/signal.h"
,
"stdint.h"
,
"sys/types.h"
,
"time.h"
,
"bits/pthread.h"
]
include_guard
=
"_RELIBC_SIGNAL_H"
include_guard
=
"_RELIBC_SIGNAL_H"
trailer
=
"#include <bits/signal.h>"
trailer
=
"#include <bits/signal.h>"
language
=
"C"
language
=
"C"
...
@@ -15,3 +15,4 @@ prefix_with_name = true
...
@@ -15,3 +15,4 @@ prefix_with_name = true
[export.rename]
[export.rename]
"timespec"
=
"struct timespec"
"timespec"
=
"struct timespec"
"sigaction"
=
"struct sigaction"
This diff is collapsed.
Click to expand it.
src/header/signal/mod.rs
+
5
−
1
View file @
284f51b4
...
@@ -35,6 +35,7 @@ pub const SIG_SETMASK: c_int = 2;
...
@@ -35,6 +35,7 @@ pub const SIG_SETMASK: c_int = 2;
#[repr(C)]
#[repr(C)]
#[derive(Clone,
Debug)]
#[derive(Clone,
Debug)]
/// cbindgen:ignore
pub
struct
sigaction
{
pub
struct
sigaction
{
pub
sa_handler
:
Option
<
extern
"C"
fn
(
c_int
)
>
,
pub
sa_handler
:
Option
<
extern
"C"
fn
(
c_int
)
>
,
pub
sa_flags
:
c_ulong
,
pub
sa_flags
:
c_ulong
,
...
@@ -52,7 +53,7 @@ pub struct sigaltstack {
...
@@ -52,7 +53,7 @@ pub struct sigaltstack {
#[repr(C)]
#[repr(C)]
#[derive(Clone,
Debug)]
#[derive(Clone,
Debug)]
pub
struct
siginfo
_t
{
pub
struct
siginfo
{
pub
si_signo
:
c_int
,
pub
si_signo
:
c_int
,
pub
si_errno
:
c_int
,
pub
si_errno
:
c_int
,
pub
si_code
:
c_int
,
pub
si_code
:
c_int
,
...
@@ -60,7 +61,10 @@ pub struct siginfo_t {
...
@@ -60,7 +61,10 @@ pub struct siginfo_t {
_si_align
:
[
usize
;
0
],
_si_align
:
[
usize
;
0
],
}
}
/// cbindgen:ignore
pub
type
sigset_t
=
c_ulonglong
;
pub
type
sigset_t
=
c_ulonglong
;
/// cbindgen:ignore
pub
type
siginfo_t
=
siginfo
;
pub
type
stack_t
=
sigaltstack
;
pub
type
stack_t
=
sigaltstack
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment