Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
U
unix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
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
Rinat Striungis
unix
Commits
4c25a0d4
Commit
4c25a0d4
authored
9 years ago
by
Herbert Valerio Riedel
Browse files
Options
Downloads
Patches
Plain Diff
Replace `__hsunix_nanosleep` wrapper with CApiFFI
parent
944b05c4
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
System/Posix/Unistd.hsc
+2
-2
2 additions, 2 deletions
System/Posix/Unistd.hsc
cbits/HsUnix.c
+0
-8
0 additions, 8 deletions
cbits/HsUnix.c
include/HsUnix.h
+0
-5
0 additions, 5 deletions
include/HsUnix.h
with
2 additions
and
15 deletions
System/Posix/Unistd.hsc
+
2
−
2
View file @
4c25a0d4
...
@@ -181,9 +181,9 @@ nanosleep nsecs = do
...
@@ -181,9 +181,9 @@ nanosleep nsecs = do
else throwErrno "nanosleep"
else throwErrno "nanosleep"
loop (fromIntegral tv_sec0 :: CTime) (fromIntegral tv_nsec0 :: CTime)
loop (fromIntegral tv_sec0 :: CTime) (fromIntegral tv_nsec0 :: CTime)
data CTimeSpec
data
{-# CTYPE "struct timespec" #-}
CTimeSpec
foreign import c
call
safe "
__hsunix_
nanosleep"
foreign import c
api
safe "
HsUnix.h
nanosleep"
c_nanosleep :: Ptr CTimeSpec -> Ptr CTimeSpec -> IO CInt
c_nanosleep :: Ptr CTimeSpec -> Ptr CTimeSpec -> IO CInt
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
cbits/HsUnix.c
+
0
−
8
View file @
4c25a0d4
...
@@ -34,14 +34,6 @@ int __hsunix_getpwuid_r(uid_t uid, struct passwd *pw, char *buffer,
...
@@ -34,14 +34,6 @@ int __hsunix_getpwuid_r(uid_t uid, struct passwd *pw, char *buffer,
}
}
#endif
#endif
#ifdef HAVE_NANOSLEEP
// nanosleep is a macro on some platforms, so we need a wrapper:
int
__hsunix_nanosleep
(
const
struct
timespec
*
rqtp
,
struct
timespec
*
rmtp
)
{
return
nanosleep
(
rqtp
,
rmtp
);
}
#endif
#ifdef HAVE_PTSNAME
#ifdef HAVE_PTSNAME
// I cannot figure out how to make the definitions of the following
// I cannot figure out how to make the definitions of the following
// functions visible in <stdlib.h> on Linux. But these definitions
// functions visible in <stdlib.h> on Linux. But these definitions
...
...
This diff is collapsed.
Click to expand it.
include/HsUnix.h
+
0
−
5
View file @
4c25a0d4
...
@@ -125,11 +125,6 @@ int __hsunix_getpwuid_r(uid_t, struct passwd *, char *, size_t,
...
@@ -125,11 +125,6 @@ int __hsunix_getpwuid_r(uid_t, struct passwd *, char *, size_t,
struct
passwd
**
);
struct
passwd
**
);
#endif
#endif
#ifdef HAVE_NANOSLEEP
// nanosleep is a macro on some platforms, so we need a wrapper:
int
__hsunix_nanosleep
(
const
struct
timespec
*
,
struct
timespec
*
);
#endif
#ifdef HAVE_PTSNAME
#ifdef HAVE_PTSNAME
// I cannot figure out how to make the definitions of the following
// I cannot figure out how to make the definitions of the following
// functions visible in <stdlib.h> on Linux. But these definitions
// functions visible in <stdlib.h> on Linux. But these definitions
...
...
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