module Bindings.Posix.Sys.Types where
import Foreign.Ptr (Ptr,FunPtr,plusPtr)
import Foreign.Ptr (wordPtrToPtr,castPtrToFunPtr)
import Foreign.Storable
import Foreign.C.Types
import Foreign.C.String (CString,CStringLen,CWString,CWStringLen)
import Foreign.Marshal.Alloc (alloca)
import Foreign.Marshal.Array (peekArray,pokeArray)
import Data.Int
import Data.Word
type C'blkcnt_t = CInt
type C'blksize_t = CInt
type C'clockid_t = CInt
type C'dev_t = Word64
type C'gid_t = CUInt
type C'id_t = CUInt
type C'ino_t = CUInt
type C'mode_t = CUInt
type C'nlink_t = CUInt
type C'off_t = CInt
type C'pid_t = CInt
data C'pthread_attr_t = C'pthread_attr_t{
} deriving (Eq,Show)
instance Storable C'pthread_attr_t where
sizeOf _ = 36
alignment _ = 4
peek p = do
return $ C'pthread_attr_t
poke p (C'pthread_attr_t) = do
return ()
data C'pthread_barrier_t = C'pthread_barrier_t{
} deriving (Eq,Show)
instance Storable C'pthread_barrier_t where
sizeOf _ = 20
alignment _ = 4
peek p = do
return $ C'pthread_barrier_t
poke p (C'pthread_barrier_t) = do
return ()
data C'pthread_barrierattr_t = C'pthread_barrierattr_t{
} deriving (Eq,Show)
instance Storable C'pthread_barrierattr_t where
sizeOf _ = 4
alignment _ = 4
peek p = do
return $ C'pthread_barrierattr_t
poke p (C'pthread_barrierattr_t) = do
return ()
data C'pthread_cond_t = C'pthread_cond_t{
} deriving (Eq,Show)
instance Storable C'pthread_cond_t where
sizeOf _ = 48
alignment _ = 4
peek p = do
return $ C'pthread_cond_t
poke p (C'pthread_cond_t) = do
return ()
data C'pthread_condattr_t = C'pthread_condattr_t{
} deriving (Eq,Show)
instance Storable C'pthread_condattr_t where
sizeOf _ = 4
alignment _ = 4
peek p = do
return $ C'pthread_condattr_t
poke p (C'pthread_condattr_t) = do
return ()
data C'pthread_key_t = C'pthread_key_t{
} deriving (Eq,Show)
instance Storable C'pthread_key_t where
sizeOf _ = 4
alignment _ = 4
peek p = do
return $ C'pthread_key_t
poke p (C'pthread_key_t) = do
return ()
data C'pthread_mutex_t = C'pthread_mutex_t{
} deriving (Eq,Show)
instance Storable C'pthread_mutex_t where
sizeOf _ = 24
alignment _ = 4
peek p = do
return $ C'pthread_mutex_t
poke p (C'pthread_mutex_t) = do
return ()
data C'pthread_mutexattr_t = C'pthread_mutexattr_t{
} deriving (Eq,Show)
instance Storable C'pthread_mutexattr_t where
sizeOf _ = 4
alignment _ = 4
peek p = do
return $ C'pthread_mutexattr_t
poke p (C'pthread_mutexattr_t) = do
return ()
data C'pthread_once_t = C'pthread_once_t{
} deriving (Eq,Show)
instance Storable C'pthread_once_t where
sizeOf _ = 4
alignment _ = 4
peek p = do
return $ C'pthread_once_t
poke p (C'pthread_once_t) = do
return ()
data C'pthread_rwlock_t = C'pthread_rwlock_t{
} deriving (Eq,Show)
instance Storable C'pthread_rwlock_t where
sizeOf _ = 32
alignment _ = 4
peek p = do
return $ C'pthread_rwlock_t
poke p (C'pthread_rwlock_t) = do
return ()
data C'pthread_rwlockattr_t = C'pthread_rwlockattr_t{
} deriving (Eq,Show)
instance Storable C'pthread_rwlockattr_t where
sizeOf _ = 8
alignment _ = 4
peek p = do
return $ C'pthread_rwlockattr_t
poke p (C'pthread_rwlockattr_t) = do
return ()
data C'pthread_spinlock_t = C'pthread_spinlock_t{
} deriving (Eq,Show)
instance Storable C'pthread_spinlock_t where
sizeOf _ = 4
alignment _ = 4
peek p = do
return $ C'pthread_spinlock_t
poke p (C'pthread_spinlock_t) = do
return ()
type C'pthread_t = CUInt
type C'size_t = CUInt
type C'ssize_t = CInt
type C'suseconds_t = CInt
type C'time_t = CInt
type C'timer_t = CUInt
type C'uid_t = CUInt