{-# LINE 1 "src/System/Proc/Bindings/C.hsc" #-}
{-# LANGUAGE CApiFFI #-}
{-# LANGUAGE CPP #-}
module System.Proc.Bindings.C
( Proc (..)
, SignalMask
, Address
, callocProc
, freeProc
, peekProc
, readNextProcPtr
, readAllProcsSimple
, readAllProcsPids
, readAllProcsUids
, readSelfProc
)
where
import Foreign
import Foreign.C.Types
import GHC.Stack
import System.Posix.Types
import System.Proc.Bindings.C.Utils
import System.Proc.Bindings.Tab.C
{-# LINE 46 "src/System/Proc/Bindings/C.hsc" #-}
type Address = CULong
{-# LINE 48 "src/System/Proc/Bindings/C.hsc" #-}
{-# LINE 63 "src/System/Proc/Bindings/C.hsc" #-}
type SignalMask = Maybe String
{-# LINE 67 "src/System/Proc/Bindings/C.hsc" #-}
data Proc = Proc
{ Proc -> CInt
taskId :: CInt
, Proc -> CInt
parentPid :: CInt
, Proc -> CULong
majDelta :: CULong
, Proc -> CULong
minDelta :: CULong
, Proc -> CUInt
cpuUsagePercent :: CUInt
, Proc -> CChar
processStateCode :: CChar
, Proc -> CULLong
userModeCPUTime :: CULLong
, Proc -> CULLong
kernelModeCPUTime :: CULLong
, Proc -> CULLong
cumulativeUserModeCPUTime :: CULLong
, Proc -> CULLong
cumulativeKernelModeCPUTime :: CULLong
, Proc -> CULLong
startTimeInSeconds :: CULLong
, Proc -> SignalMask
pendingSignalMask :: SignalMask
, Proc -> SignalMask
blockSignalMask :: SignalMask
, Proc -> SignalMask
ignoredSignalMask :: SignalMask
, Proc -> SignalMask
caughtSignalMask :: SignalMask
, Proc -> SignalMask
perTaskPendingSignals :: SignalMask
, Proc -> CULong
codeStartAddress :: Address
, Proc -> CULong
codeEndAddress :: Address
, Proc -> CULong
stackBottomAddress :: Address
, Proc -> CULong
kernelStackPointer :: Address
, Proc -> CULong
kernelInstructionPointer :: Address
, Proc -> CULong
kernelWaitChannelAddress :: Address
, Proc -> CLong
kernelSchedulingPriority :: CLong
, Proc -> CLong
niceLevel :: CLong
, :: CLong
, Proc -> CLong
alarm :: CLong
, Proc -> CLong
totalVirtualMemInPages :: CLong
, Proc -> CLong
residentNonSwappedMemInPages :: CLong
, Proc -> CLong
sharedMemInPages :: CLong
, Proc -> CLong
textResidentSetInPages :: CLong
, Proc -> CLong
libraryResidentSetInPages :: CLong
, Proc -> CLong
dataAndStackResidentSetInPages :: CLong
, Proc -> CLong
dirtyPages :: CLong
, Proc -> CULong
vmSizeInKb :: CULong
, Proc -> CULong
vmLockedPagesInKb :: CULong
, :: CULong
, :: CULong
, :: CULong
, :: CULong
, Proc -> CULong
vmDataSizeInKb :: CULong
, Proc -> CULong
vmStackSizeInKb :: CULong
, Proc -> CULong
vmSwapSizeInKb :: CULong
, Proc -> CULong
vmExeInKb :: CULong
, Proc -> CULong
vmTotalLibraryPagesInKb :: CULong
, Proc -> CULong
realTimePriority :: CULong
, Proc -> CULong
schedulingClass :: CULong
, Proc -> CULong
virtualMemoryInPages :: CULong
, Proc -> CULong
residentSetSizeLimit :: CULong
, Proc -> CULong
kernelFlags :: CULong
, Proc -> CULong
minorPageFaults :: CULong
, Proc -> CULong
majorPageFaults :: CULong
, Proc -> CULong
cumulativeMinorPageFaults :: CULong
, Proc -> CULong
cumulativeMajorPageFaults :: CULong
, Proc -> [String]
environment :: [String]
, Proc -> [String]
cmdline :: [String]
, Proc -> [String]
cgroup :: [String]
, Proc -> SignalMask
cgroupName :: Maybe String
, Proc -> SignalMask
supplementaryGids :: Maybe String
, Proc -> SignalMask
supplementaryGroupNames :: Maybe String
, Proc -> SignalMask
effectiveUserName :: Maybe String
, Proc -> SignalMask
realUserName :: Maybe String
, Proc -> SignalMask
savedUserName :: Maybe String
, Proc -> SignalMask
filesystemUserName :: Maybe String
, Proc -> SignalMask
realGroupName :: Maybe String
, Proc -> SignalMask
effectiveGroupname :: Maybe String
, Proc -> SignalMask
savedGroupName :: Maybe String
, Proc -> SignalMask
filesystemGroupName :: Maybe String
, Proc -> SignalMask
cmd :: Maybe String
, Proc -> CInt
processGroupId :: CInt
, Proc -> CInt
sessionId :: CInt
, Proc -> CInt
numberOfThreasds :: CInt
, Proc -> CInt
threadGroupId :: CInt
, Proc -> CInt
ttyNumber :: CInt
, Proc -> CInt
effectiveUserId :: CInt
, Proc -> CInt
effectiveGroupId :: CInt
, Proc -> CInt
realUserId :: CInt
, Proc -> CInt
realGroupId :: CInt
, Proc -> CInt
savedUserId :: CInt
, Proc -> CInt
savedGroupId :: CInt
, Proc -> CInt
filesystemUserId :: CInt
, Proc -> CInt
filesystemGroupId :: CInt
, Proc -> CInt
terminalProcessGroupId :: CInt
, Proc -> CInt
exitSignal :: CInt
, Proc -> CInt
cpu :: CInt
, Proc -> CInt
oomScore :: CInt
, Proc -> CInt
oomAdjustment :: CInt
, Proc -> [CLong]
namespaces :: [CLong]
, Proc -> SignalMask
systemdContainerName :: Maybe String
, Proc -> SignalMask
systemdSessionOwnerUid :: Maybe String
, Proc -> SignalMask
systemdLoginSessionSeat :: Maybe String
, Proc -> SignalMask
systemdLoginSessionId :: Maybe String
, Proc -> SignalMask
systemdSliceUnit :: Maybe String
, Proc -> SignalMask
systemdSystemUnitId :: Maybe String
, Proc -> SignalMask
systemdUserUnitId :: Maybe String
, Proc -> SignalMask
lxcContainerName :: Maybe String
}
deriving (Int -> Proc -> ShowS
[Proc] -> ShowS
Proc -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Proc] -> ShowS
$cshowList :: [Proc] -> ShowS
show :: Proc -> String
$cshow :: Proc -> String
showsPrec :: Int -> Proc -> ShowS
$cshowsPrec :: Int -> Proc -> ShowS
Show, Proc -> Proc -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Proc -> Proc -> Bool
$c/= :: Proc -> Proc -> Bool
== :: Proc -> Proc -> Bool
$c== :: Proc -> Proc -> Bool
Eq)
readLongList :: Ptr CLong -> IO [CLong]
readLongList :: Ptr CLong -> IO [CLong]
readLongList = forall a.
(HasCallStack, Storable a, Num a, Eq a) =>
Ptr a -> IO [a]
readNullTermArray
{-# INLINE readLongList #-}
peekProc :: HasCallStack => Ptr Proc -> IO Proc
peekProc :: HasCallStack => Ptr Proc -> IO Proc
peekProc Ptr Proc
ptr = do
HasCallStack => String -> IO ()
xprintf forall a b. (a -> b) -> a -> b
$ String
"peekProc " forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> String
show Ptr Proc
ptr
CInt
taskId <- ((\Ptr Proc
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr Proc
hsc_ptr Int
0)) Ptr Proc
ptr
{-# LINE 601 "src/System/Proc/Bindings/C.hsc" #-}
parentPid <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 602 "src/System/Proc/Bindings/C.hsc" #-}
majDelta <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 603 "src/System/Proc/Bindings/C.hsc" #-}
minDelta <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 604 "src/System/Proc/Bindings/C.hsc" #-}
cpuUsagePercent <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 605 "src/System/Proc/Bindings/C.hsc" #-}
processStateCode <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
{-# LINE 606 "src/System/Proc/Bindings/C.hsc" #-}
CULLong
userModeCPUTime <- ((\Ptr Proc
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr Proc
hsc_ptr Int
32)) Ptr Proc
ptr
{-# LINE 610 "src/System/Proc/Bindings/C.hsc" #-}
kernelModeCPUTime <- ((\hsc_ptr -> peekByteOff hsc_ptr 40)) ptr
{-# LINE 611 "src/System/Proc/Bindings/C.hsc" #-}
cumulativeUserModeCPUTime <- ((\hsc_ptr -> peekByteOff hsc_ptr 48)) ptr
{-# LINE 612 "src/System/Proc/Bindings/C.hsc" #-}
cumulativeKernelModeCPUTime <- ((\hsc_ptr -> peekByteOff hsc_ptr 56)) ptr
{-# LINE 613 "src/System/Proc/Bindings/C.hsc" #-}
startTimeInSeconds <- ((\hsc_ptr -> peekByteOff hsc_ptr 64)) ptr
{-# LINE 614 "src/System/Proc/Bindings/C.hsc" #-}
{-# LINE 615 "src/System/Proc/Bindings/C.hsc" #-}
pendingSignalMask <- (readStringMaybe $ ((\hsc_ptr -> hsc_ptr `plusPtr` 72)) ptr)
{-# LINE 616 "src/System/Proc/Bindings/C.hsc" #-}
blockSignalMask <- (readStringMaybe $ ((\hsc_ptr -> hsc_ptr `plusPtr` 90)) ptr)
{-# LINE 617 "src/System/Proc/Bindings/C.hsc" #-}
ignoredSignalMask <- (readStringMaybe $ ((\hsc_ptr -> hsc_ptr `plusPtr` 108)) ptr)
{-# LINE 618 "src/System/Proc/Bindings/C.hsc" #-}
caughtSignalMask <- (readStringMaybe $ ((\hsc_ptr -> hsc_ptr `plusPtr` 126)) ptr)
{-# LINE 619 "src/System/Proc/Bindings/C.hsc" #-}
perTaskPendingSignals <- (readStringMaybe $ ((\hsc_ptr -> hsc_ptr `plusPtr` 144)) ptr)
{-# LINE 620 "src/System/Proc/Bindings/C.hsc" #-}
{-# LINE 627 "src/System/Proc/Bindings/C.hsc" #-}
CULong
codeStartAddress <- ((\Ptr Proc
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr Proc
hsc_ptr Int
168)) Ptr Proc
ptr
{-# LINE 628 "src/System/Proc/Bindings/C.hsc" #-}
codeEndAddress <- ((\hsc_ptr -> peekByteOff hsc_ptr 176)) ptr
{-# LINE 629 "src/System/Proc/Bindings/C.hsc" #-}
stackBottomAddress <- ((\hsc_ptr -> peekByteOff hsc_ptr 184)) ptr
{-# LINE 630 "src/System/Proc/Bindings/C.hsc" #-}
kernelStackPointer <- ((\hsc_ptr -> peekByteOff hsc_ptr 192)) ptr
{-# LINE 631 "src/System/Proc/Bindings/C.hsc" #-}
kernelInstructionPointer <- ((\hsc_ptr -> peekByteOff hsc_ptr 200)) ptr
{-# LINE 632 "src/System/Proc/Bindings/C.hsc" #-}
kernelWaitChannelAddress <- ((\hsc_ptr -> peekByteOff hsc_ptr 208)) ptr
{-# LINE 633 "src/System/Proc/Bindings/C.hsc" #-}
kernelSchedulingPriority <- ((\hsc_ptr -> peekByteOff hsc_ptr 216)) ptr
{-# LINE 634 "src/System/Proc/Bindings/C.hsc" #-}
niceLevel <- ((\hsc_ptr -> peekByteOff hsc_ptr 224)) ptr
{-# LINE 635 "src/System/Proc/Bindings/C.hsc" #-}
rss <- ((\hsc_ptr -> peekByteOff hsc_ptr 232)) ptr
{-# LINE 636 "src/System/Proc/Bindings/C.hsc" #-}
alarm <- ((\hsc_ptr -> peekByteOff hsc_ptr 240)) ptr
{-# LINE 637 "src/System/Proc/Bindings/C.hsc" #-}
totalVirtualMemInPages <- ((\hsc_ptr -> peekByteOff hsc_ptr 248)) ptr
{-# LINE 638 "src/System/Proc/Bindings/C.hsc" #-}
residentNonSwappedMemInPages <- ((\hsc_ptr -> peekByteOff hsc_ptr 256)) ptr
{-# LINE 639 "src/System/Proc/Bindings/C.hsc" #-}
sharedMemInPages <- ((\hsc_ptr -> peekByteOff hsc_ptr 264)) ptr
{-# LINE 640 "src/System/Proc/Bindings/C.hsc" #-}
textResidentSetInPages <- ((\hsc_ptr -> peekByteOff hsc_ptr 272)) ptr
{-# LINE 641 "src/System/Proc/Bindings/C.hsc" #-}
libraryResidentSetInPages <- ((\hsc_ptr -> peekByteOff hsc_ptr 280)) ptr
{-# LINE 642 "src/System/Proc/Bindings/C.hsc" #-}
dataAndStackResidentSetInPages <- ((\hsc_ptr -> peekByteOff hsc_ptr 288)) ptr
{-# LINE 643 "src/System/Proc/Bindings/C.hsc" #-}
dirtyPages <- ((\hsc_ptr -> peekByteOff hsc_ptr 296)) ptr
{-# LINE 644 "src/System/Proc/Bindings/C.hsc" #-}
vmSizeInKb <- ((\hsc_ptr -> peekByteOff hsc_ptr 304)) ptr
{-# LINE 645 "src/System/Proc/Bindings/C.hsc" #-}
vmLockedPagesInKb <- ((\hsc_ptr -> peekByteOff hsc_ptr 312)) ptr
{-# LINE 646 "src/System/Proc/Bindings/C.hsc" #-}
vmRssInKb <- ((\hsc_ptr -> peekByteOff hsc_ptr 320)) ptr
{-# LINE 647 "src/System/Proc/Bindings/C.hsc" #-}
vmRssAnonInKb <- ((\hsc_ptr -> peekByteOff hsc_ptr 328)) ptr
{-# LINE 648 "src/System/Proc/Bindings/C.hsc" #-}
vmRssFileBackedInKb <- ((\hsc_ptr -> peekByteOff hsc_ptr 336)) ptr
{-# LINE 649 "src/System/Proc/Bindings/C.hsc" #-}
vmRssSharedInKb <- ((\hsc_ptr -> peekByteOff hsc_ptr 344)) ptr
{-# LINE 650 "src/System/Proc/Bindings/C.hsc" #-}
vmDataSizeInKb <- ((\hsc_ptr -> peekByteOff hsc_ptr 352)) ptr
{-# LINE 651 "src/System/Proc/Bindings/C.hsc" #-}
vmStackSizeInKb <- ((\hsc_ptr -> peekByteOff hsc_ptr 360)) ptr
{-# LINE 652 "src/System/Proc/Bindings/C.hsc" #-}
vmSwapSizeInKb <- ((\hsc_ptr -> peekByteOff hsc_ptr 368)) ptr
{-# LINE 653 "src/System/Proc/Bindings/C.hsc" #-}
vmExeInKb <- ((\hsc_ptr -> peekByteOff hsc_ptr 376)) ptr
{-# LINE 654 "src/System/Proc/Bindings/C.hsc" #-}
vmTotalLibraryPagesInKb <- ((\hsc_ptr -> peekByteOff hsc_ptr 384)) ptr
{-# LINE 655 "src/System/Proc/Bindings/C.hsc" #-}
realTimePriority <- ((\hsc_ptr -> peekByteOff hsc_ptr 392)) ptr
{-# LINE 656 "src/System/Proc/Bindings/C.hsc" #-}
schedulingClass <- ((\hsc_ptr -> peekByteOff hsc_ptr 400)) ptr
{-# LINE 657 "src/System/Proc/Bindings/C.hsc" #-}
virtualMemoryInPages <- ((\hsc_ptr -> peekByteOff hsc_ptr 408)) ptr
{-# LINE 658 "src/System/Proc/Bindings/C.hsc" #-}
residentSetSizeLimit <- ((\hsc_ptr -> peekByteOff hsc_ptr 416)) ptr
{-# LINE 659 "src/System/Proc/Bindings/C.hsc" #-}
kernelFlags <- ((\hsc_ptr -> peekByteOff hsc_ptr 424)) ptr
{-# LINE 660 "src/System/Proc/Bindings/C.hsc" #-}
minorPageFaults <- ((\hsc_ptr -> peekByteOff hsc_ptr 432)) ptr
{-# LINE 661 "src/System/Proc/Bindings/C.hsc" #-}
majorPageFaults <- ((\hsc_ptr -> peekByteOff hsc_ptr 440)) ptr
{-# LINE 662 "src/System/Proc/Bindings/C.hsc" #-}
cumulativeMinorPageFaults <- ((\hsc_ptr -> peekByteOff hsc_ptr 448)) ptr
{-# LINE 663 "src/System/Proc/Bindings/C.hsc" #-}
cumulativeMajorPageFaults <- ((\hsc_ptr -> peekByteOff hsc_ptr 456)) ptr
{-# LINE 664 "src/System/Proc/Bindings/C.hsc" #-}
environment <- readStringList =<< ((\hsc_ptr -> peekByteOff hsc_ptr 464)) ptr
{-# LINE 665 "src/System/Proc/Bindings/C.hsc" #-}
cmdline <- readStringList =<< ((\hsc_ptr -> peekByteOff hsc_ptr 472)) ptr
{-# LINE 666 "src/System/Proc/Bindings/C.hsc" #-}
cgroup <- readStringList =<< ((\hsc_ptr -> peekByteOff hsc_ptr 480)) ptr
{-# LINE 667 "src/System/Proc/Bindings/C.hsc" #-}
cgroupName <- readStringMaybe =<< ((\hsc_ptr -> peekByteOff hsc_ptr 488)) ptr
{-# LINE 668 "src/System/Proc/Bindings/C.hsc" #-}
supplementaryGids <- readStringMaybe =<< ((\hsc_ptr -> peekByteOff hsc_ptr 496)) ptr
{-# LINE 669 "src/System/Proc/Bindings/C.hsc" #-}
supplementaryGroupNames <- readStringMaybe =<< ((\hsc_ptr -> peekByteOff hsc_ptr 504)) ptr
{-# LINE 670 "src/System/Proc/Bindings/C.hsc" #-}
effectiveUserName <- readStringMaybe (((\hsc_ptr -> hsc_ptr `plusPtr` 512)) ptr)
{-# LINE 671 "src/System/Proc/Bindings/C.hsc" #-}
realUserName <- readStringMaybe (((\hsc_ptr -> hsc_ptr `plusPtr` 545)) ptr)
{-# LINE 672 "src/System/Proc/Bindings/C.hsc" #-}
savedUserName <- readStringMaybe (((\hsc_ptr -> hsc_ptr `plusPtr` 578)) ptr)
{-# LINE 673 "src/System/Proc/Bindings/C.hsc" #-}
filesystemUserName <- readStringMaybe (((\hsc_ptr -> hsc_ptr `plusPtr` 611)) ptr)
{-# LINE 674 "src/System/Proc/Bindings/C.hsc" #-}
realGroupName <- readStringMaybe (((\hsc_ptr -> hsc_ptr `plusPtr` 644)) ptr)
{-# LINE 675 "src/System/Proc/Bindings/C.hsc" #-}
effectiveGroupname <- readStringMaybe (((\hsc_ptr -> hsc_ptr `plusPtr` 677)) ptr)
{-# LINE 676 "src/System/Proc/Bindings/C.hsc" #-}
savedGroupName <- readStringMaybe (((\hsc_ptr -> hsc_ptr `plusPtr` 710)) ptr)
{-# LINE 677 "src/System/Proc/Bindings/C.hsc" #-}
filesystemGroupName <- readStringMaybe (((\hsc_ptr -> hsc_ptr `plusPtr` 743)) ptr)
{-# LINE 678 "src/System/Proc/Bindings/C.hsc" #-}
cmd <- readStringMaybe (((\hsc_ptr -> hsc_ptr `plusPtr` 776)) ptr)
{-# LINE 679 "src/System/Proc/Bindings/C.hsc" #-}
CInt
processGroupId <- ((\Ptr Proc
hsc_ptr -> forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr Proc
hsc_ptr Int
856)) Ptr Proc
ptr
{-# LINE 682 "src/System/Proc/Bindings/C.hsc" #-}
sessionId <- ((\hsc_ptr -> peekByteOff hsc_ptr 860)) ptr
{-# LINE 683 "src/System/Proc/Bindings/C.hsc" #-}
numberOfThreasds <- ((\hsc_ptr -> peekByteOff hsc_ptr 864)) ptr
{-# LINE 684 "src/System/Proc/Bindings/C.hsc" #-}
threadGroupId <- ((\hsc_ptr -> peekByteOff hsc_ptr 868)) ptr
{-# LINE 685 "src/System/Proc/Bindings/C.hsc" #-}
ttyNumber <- ((\hsc_ptr -> peekByteOff hsc_ptr 872)) ptr
{-# LINE 686 "src/System/Proc/Bindings/C.hsc" #-}
effectiveUserId <- ((\hsc_ptr -> peekByteOff hsc_ptr 876)) ptr
{-# LINE 687 "src/System/Proc/Bindings/C.hsc" #-}
effectiveGroupId <- ((\hsc_ptr -> peekByteOff hsc_ptr 880)) ptr
{-# LINE 688 "src/System/Proc/Bindings/C.hsc" #-}
realUserId <- ((\hsc_ptr -> peekByteOff hsc_ptr 884)) ptr
{-# LINE 689 "src/System/Proc/Bindings/C.hsc" #-}
realGroupId <- ((\hsc_ptr -> peekByteOff hsc_ptr 888)) ptr
{-# LINE 690 "src/System/Proc/Bindings/C.hsc" #-}
savedUserId <- ((\hsc_ptr -> peekByteOff hsc_ptr 892)) ptr
{-# LINE 691 "src/System/Proc/Bindings/C.hsc" #-}
savedGroupId <- ((\hsc_ptr -> peekByteOff hsc_ptr 896)) ptr
{-# LINE 692 "src/System/Proc/Bindings/C.hsc" #-}
filesystemUserId <- ((\hsc_ptr -> peekByteOff hsc_ptr 900)) ptr
{-# LINE 693 "src/System/Proc/Bindings/C.hsc" #-}
filesystemGroupId <- ((\hsc_ptr -> peekByteOff hsc_ptr 904)) ptr
{-# LINE 694 "src/System/Proc/Bindings/C.hsc" #-}
terminalProcessGroupId <- ((\hsc_ptr -> peekByteOff hsc_ptr 908)) ptr
{-# LINE 695 "src/System/Proc/Bindings/C.hsc" #-}
exitSignal <- ((\hsc_ptr -> peekByteOff hsc_ptr 912)) ptr
{-# LINE 696 "src/System/Proc/Bindings/C.hsc" #-}
cpu <- ((\hsc_ptr -> peekByteOff hsc_ptr 916)) ptr
{-# LINE 697 "src/System/Proc/Bindings/C.hsc" #-}
oomScore <- ((\hsc_ptr -> peekByteOff hsc_ptr 920)) ptr
{-# LINE 698 "src/System/Proc/Bindings/C.hsc" #-}
oomAdjustment <- ((\hsc_ptr -> peekByteOff hsc_ptr 924)) ptr
{-# LINE 699 "src/System/Proc/Bindings/C.hsc" #-}
namespaces <- readLongList (((\hsc_ptr -> hsc_ptr `plusPtr` 928)) ptr)
{-# LINE 700 "src/System/Proc/Bindings/C.hsc" #-}
systemdContainerName <- readStringMaybe =<< ((\hsc_ptr -> peekByteOff hsc_ptr 976)) ptr
{-# LINE 701 "src/System/Proc/Bindings/C.hsc" #-}
systemdSessionOwnerUid <- readStringMaybe =<< ((\hsc_ptr -> peekByteOff hsc_ptr 984)) ptr
{-# LINE 702 "src/System/Proc/Bindings/C.hsc" #-}
systemdLoginSessionSeat <- readStringMaybe =<< ((\hsc_ptr -> peekByteOff hsc_ptr 992)) ptr
{-# LINE 703 "src/System/Proc/Bindings/C.hsc" #-}
systemdLoginSessionId <- readStringMaybe =<< ((\hsc_ptr -> peekByteOff hsc_ptr 1000)) ptr
{-# LINE 704 "src/System/Proc/Bindings/C.hsc" #-}
systemdSliceUnit <- readStringMaybe =<< ((\hsc_ptr -> peekByteOff hsc_ptr 1008)) ptr
{-# LINE 705 "src/System/Proc/Bindings/C.hsc" #-}
systemdSystemUnitId <- readStringMaybe =<< ((\hsc_ptr -> peekByteOff hsc_ptr 1016)) ptr
{-# LINE 706 "src/System/Proc/Bindings/C.hsc" #-}
systemdUserUnitId <- readStringMaybe =<< ((\hsc_ptr -> peekByteOff hsc_ptr 1024)) ptr
{-# LINE 707 "src/System/Proc/Bindings/C.hsc" #-}
lxcContainerName <- readStringMaybe =<< ((\hsc_ptr -> peekByteOff hsc_ptr 1032)) ptr
{-# LINE 708 "src/System/Proc/Bindings/C.hsc" #-}
pure Proc {..}
callocProc :: IO (Ptr Proc)
callocProc :: IO (Ptr Proc)
callocProc = forall a. Int -> IO (Ptr a)
callocBytes ((Int
1040))
{-# LINE 712 "src/System/Proc/Bindings/C.hsc" #-}
foreign import capi unsafe "read_proc_wrapper" readNextProcPtr :: Ptr ProcTabC -> Ptr Proc -> IO (Ptr Proc)
foreign import capi unsafe "free_proc_wrapper" freeProc :: Ptr Proc -> IO ()
foreign import capi unsafe "readallprocs_simple" readAllProcsSimple :: CInt -> IO (Ptr (Ptr Proc))
foreign import capi unsafe "readallprocs_pids" readAllProcsPids :: CInt -> Ptr CPid -> IO (Ptr (Ptr Proc))
foreign import capi unsafe "readallprocs_uids" readAllProcsUids :: CInt -> Ptr CUid -> CInt -> IO (Ptr (Ptr Proc))
foreign import capi unsafe "lookup_self_wrapper" readSelfProc :: IO (Ptr Proc)