Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
2ea50a1b
Commit
2ea50a1b
authored
Oct 15, 2012
by
ian@well-typed.com
Browse files
Use CAPI to make the C wrapper for kevent
parent
e2fec979
Changes
2
Hide whitespace changes
Inline
Side-by-side
libraries/base/GHC/Event/KQueue.hsc
View file @
2ea50a1b
...
...
@@ -305,7 +305,7 @@ foreign import ccall safe "kevent64"
c_kevent64 :: QueueFd -> Ptr Event -> CInt -> Ptr Event -> CInt -> CUInt
-> Ptr TimeSpec -> IO CInt
#elif defined(HAVE_KEVENT)
foreign import c
call
safe "
__hscore_
kevent"
foreign import c
api
safe "
sys/event.h
kevent"
c_kevent :: QueueFd -> Ptr Event -> CInt -> Ptr Event -> CInt
-> Ptr TimeSpec -> IO CInt
#else
...
...
libraries/base/include/HsBase.h
View file @
2ea50a1b
...
...
@@ -155,10 +155,6 @@ extern HsWord64 getMonotonicUSec(void);
#include
<sys/select.h>
#endif
#if HAVE_SYS_EVENT_H
#include
<sys/event.h>
#endif
/* in inputReady.c */
extern
int
fdReady
(
int
fd
,
int
write
,
int
msecs
,
int
isSock
);
...
...
@@ -545,15 +541,6 @@ INLINE int __hscore_open(char *file, int how, mode_t mode) {
}
#endif
#ifdef HAVE_KEVENT
INLINE
int
__hscore_kevent
(
int
kq
,
const
struct
kevent
*
changelist
,
size_t
nchanges
,
struct
kevent
*
eventlist
,
size_t
nevents
,
const
struct
timespec
*
timeout
)
{
return
kevent
(
kq
,
changelist
,
nchanges
,
eventlist
,
nevents
,
timeout
);
}
#endif
#if darwin_HOST_OS
// You should not access _environ directly on Darwin in a bundle/shared library.
// See #2458 and http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man7/environ.7.html
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment