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
7cc22dba
Commit
7cc22dba
authored
4 years ago
by
MeiK
Browse files
Options
Downloads
Patches
Plain Diff
Add getitimer and setitimer for macOS
Add getitimer and setitimer for macOS
parent
af7749c1
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/bsd/mod.rs
+21
-0
21 additions, 0 deletions
src/unix/bsd/mod.rs
with
21 additions
and
0 deletions
src/unix/bsd/mod.rs
+
21
−
0
View file @
7cc22dba
...
...
@@ -506,6 +506,10 @@ pub const PRIO_PROCESS: ::c_int = 0;
pub
const
PRIO_PGRP
:
::
c_int
=
1
;
pub
const
PRIO_USER
:
::
c_int
=
2
;
pub
const
ITIMER_REAL
:
::
c_int
=
0
;
pub
const
ITIMER_VIRTUAL
:
::
c_int
=
1
;
pub
const
ITIMER_PROF
:
::
c_int
=
2
;
f!
{
pub
fn
CMSG_FIRSTHDR
(
mhdr
:
*
const
::
msghdr
)
->
*
mut
::
cmsghdr
{
if
(
*
mhdr
)
.msg_controllen
as
usize
>=
::
mem
::
size_of
::
<
::
cmsghdr
>
()
{
...
...
@@ -849,6 +853,23 @@ extern "C" {
options
:
::
c_int
,
rusage
:
*
mut
::
rusage
,
)
->
::
pid_t
;
#[cfg_attr(
all(target_os
=
"macos"
,
target_arch
=
"x86"
),
link_name
=
"getitimer$UNIX2003"
)]
pub
fn
getitimer
(
which
:
::
c_int
,
curr_value
:
*
mut
::
itimerval
)
->
::
c_int
;
#[cfg_attr(
all(target_os
=
"macos"
,
target_arch
=
"x86"
),
link_name
=
"setitimer$UNIX2003"
)]
pub
fn
setitimer
(
which
:
::
c_int
,
new_value
:
*
const
::
itimerval
,
old_value
:
*
mut
::
itimerval
,
)
->
::
c_int
;
pub
fn
regcomp
(
preg
:
*
mut
regex_t
,
...
...
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