Copyright | (c) 2018 Quixoftic LLC |
---|---|
License | BSD3 |
Maintainer | Drew Hess <dhess-src@quixoftic.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
The actual Linux sysfs
implementation. This implementation will only
function properly on Linux systems with a sysfs
subsystem,
obviously.
- newtype SysfsIOT m a = SysfsIOT {
- runSysfsIOT :: m a
SysfsIOT transformer
An instance of MonadSysfs
which runs MonadSysfs
operations in
IO. This instance must be run on an actual Linux sysfs
GPIO
filesystem and will fail in any other environment.
Interactions with threads
Some parts of this implementation use the Haskell C FFI, and may
block on C I/O operations. (Specifically, pollFile
will block in
the C FFI until its event is triggered.) When using this
implementation with GHC, you should compile your program with the
-threaded
option, so that threads performing these blocking
operations do not block other Haskell threads in the system.
Note that the C FFI bits in this implementation are marked as
interruptible
, so that, on versions of GHC later than 7.8.1,
functions such as throwTo
will work properly
when targeting a Haskell thread that uses this implementation.
(On Haskell implementations other than GHC, the threading implications are unknown; see the implementation's notes on how its threading system interacts with the C FFI.)
SysfsIOT | |
|