Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libc
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
felixmoebius
libc
Commits
53ce57ea
Commit
53ce57ea
authored
5 years ago
by
Petr Sumbera
Browse files
Options
Downloads
Patches
Plain Diff
Add support for shared memory operations for solaris/illumos
This is needed because Firefox now uses slice-deque rust crate.
parent
13d4a5da
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/unix/solarish/mod.rs
+49
-0
49 additions, 0 deletions
src/unix/solarish/mod.rs
with
49 additions
and
0 deletions
src/unix/solarish/mod.rs
+
49
−
0
View file @
53ce57ea
...
...
@@ -34,6 +34,7 @@ pub type nl_item = ::c_int;
pub
type
mqd_t
=
*
mut
::
c_void
;
pub
type
id_t
=
::
c_int
;
pub
type
idtype_t
=
::
c_uint
;
pub
type
shmatt_t
=
::
c_ulong
;
pub
type
door_attr_t
=
::
c_uint
;
pub
type
door_id_t
=
::
c_ulonglong
;
...
...
@@ -57,6 +58,16 @@ s! {
pub
imr_interface
:
in_addr
,
}
pub
struct
ipc_perm
{
pub
uid
:
::
uid_t
,
pub
gid
:
::
gid_t
,
pub
cuid
:
::
uid_t
,
pub
cgid
:
::
gid_t
,
pub
mode
:
::
mode_t
,
pub
seq
:
::
c_uint
,
pub
key
:
::
key_t
,
}
pub
struct
sockaddr
{
pub
sa_family
:
sa_family_t
,
pub
sa_data
:
[::
c_char
;
14
],
...
...
@@ -206,6 +217,24 @@ s! {
pub
ai_next
:
*
mut
addrinfo
,
}
pub
struct
shmid_ds
{
pub
shm_perm
:
ipc_perm
,
pub
shm_segsz
:
::
size_t
,
pub
shm_flags
:
::
uintptr_t
,
pub
shm_lkcnt
:
::
c_ushort
,
pub
shm_lpid
:
::
pid_t
,
pub
shm_cpid
:
::
pid_t
,
pub
shm_nattch
:
::
shmatt_t
,
pub
shm_cnattch
:
::
c_ulong
,
pub
shm_atime
:
::
time_t
,
pub
shm_dtime
:
::
time_t
,
pub
shm_ctime
:
::
time_t
,
pub
shm_amp
:
*
mut
::
c_void
,
pub
shm_gransize
:
u64
,
pub
shm_allocated
:
u64
,
pub
shm_pad4
:
[
i64
;
1
],
}
pub
struct
sigset_t
{
bits
:
[
u32
;
4
],
}
...
...
@@ -1352,6 +1381,16 @@ pub const IFF_VIRTUAL: ::c_longlong = 0x2000000000; // Cannot send/receive pkts
pub
const
IFF_DUPLICATE
:
::
c_longlong
=
0x4000000000
;
// Local address in use
pub
const
IFF_IPMP
:
::
c_longlong
=
0x8000000000
;
// IPMP IP interface
// sys/ipc.h:
pub
const
IPC_ALLOC
:
::
c_int
=
0x8000
;
pub
const
IPC_CREAT
:
::
c_int
=
0x200
;
pub
const
IPC_EXCL
:
::
c_int
=
0x400
;
pub
const
IPC_NOWAIT
:
::
c_int
=
0x800
;
pub
const
IPC_PRIVATE
:
key_t
=
0
;
pub
const
IPC_RMID
:
::
c_int
=
10
;
pub
const
IPC_SET
:
::
c_int
=
11
;
pub
const
IPC_SEAT
:
::
c_int
=
12
;
pub
const
SHUT_RD
:
::
c_int
=
0
;
pub
const
SHUT_WR
:
::
c_int
=
1
;
pub
const
SHUT_RDWR
:
::
c_int
=
2
;
...
...
@@ -2011,6 +2050,16 @@ extern "C" {
advice
:
::
c_int
,
)
->
::
c_int
;
pub
fn
shmat
(
shmid
:
::
c_int
,
shmaddr
:
*
const
::
c_void
,
shmflg
:
::
c_int
)
->
*
mut
::
c_void
;
pub
fn
shmctl
(
shmid
:
::
c_int
,
cmd
:
::
c_int
,
buf
:
*
mut
::
shmid_ds
)
->
::
c_int
;
pub
fn
shmdt
(
shmaddr
:
*
const
::
c_void
)
->
::
c_int
;
pub
fn
shmget
(
key
:
key_t
,
size
:
::
size_t
,
shmflg
:
::
c_int
)
->
::
c_int
;
pub
fn
shm_open
(
name
:
*
const
::
c_char
,
oflag
:
::
c_int
,
...
...
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