Skip to content

Support calls to the SunOS Doors API #1404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions src/unix/solarish/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ pub type mqd_t = *mut ::c_void;
pub type id_t = ::c_int;
pub type idtype_t = ::c_uint;

pub type door_attr_t = ::c_uint;
pub type door_id_t = ::c_ulonglong;

#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum timezone {}
impl ::Copy for timezone {}
Expand Down Expand Up @@ -338,6 +341,11 @@ s! {
pub portev_object: ::uintptr_t,
pub portev_user: *mut ::c_void,
}

pub struct door_desc_t__d_data__d_desc {
pub d_descriptor: ::c_int,
pub d_id: ::door_id_t
}
}

s_no_extra_traits! {
Expand Down Expand Up @@ -401,6 +409,25 @@ s_no_extra_traits! {
pub sigev_notify_attributes: *const ::pthread_attr_t,
__sigev_pad2: ::c_int,
}

pub union door_desc_t__d_data {
pub d_desc: door_desc_t__d_data__d_desc,
d_resv: [::c_int; 5], /* Check out /usr/include/sys/door.h */
}

pub struct door_desc_t {
pub d_attributes: door_attr_t,
pub d_data: door_desc_t__d_data,
}

pub struct door_arg_t {
pub data_ptr: *const ::c_char,
pub data_size: ::size_t,
pub desc_ptr: *const door_desc_t,
pub dec_num: ::c_uint,
pub rbuf: *const ::c_char,
pub rsize: ::size_t,
}
}

cfg_if! {
Expand Down Expand Up @@ -2108,6 +2135,19 @@ extern {
pub fn dup3(src: ::c_int, dst: ::c_int, flags: ::c_int) -> ::c_int;
pub fn uname(buf: *mut ::utsname) -> ::c_int;
pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int;
pub fn door_call(d: ::c_int, params: *const door_arg_t) -> ::c_int;
pub fn door_return(data_ptr: *const ::c_char,
data_size: ::size_t,
desc_ptr: *const door_desc_t,
num_desc: ::c_uint);
pub fn door_create(server_procedure: extern fn(cookie: *const ::c_void,
argp: *const ::c_char,
arg_size: ::size_t,
dp: *const door_desc_t,
n_desc: ::c_uint),
cookie: *const ::c_void,
attributes: door_attr_t) -> ::c_int;
pub fn fattach(fildes: ::c_int, path: *const ::c_char) -> ::c_int;
}

mod compat;
Expand Down