Luna/libs/libc/include/luna/pstat.h

38 lines
668 B
C

#ifndef _LUNA_PSTAT_H
#define _LUNA_PSTAT_H
#include <sys/types.h>
struct pstat
{
pid_t pt_pid;
pid_t pt_ppid;
char pt_name[128];
int pt_state;
long pt_time;
uid_t pt_uid;
gid_t pt_gid;
};
#define PT_IDLE 0
#define PT_RUNNING 1
#define PT_SLEEPING 2
#define PT_ZOMBIE 3
#define PT_WAITING 4
#ifdef __cplusplus
extern "C"
{
#endif
/* Returns information about the process with PID pid in buf, if buf is non-null. Luna-specific. */
pid_t pstat(pid_t pid, struct pstat* buf);
/* Returns a string representation of the process state in buf. */
const char* pstatname(struct pstat* buf);
#ifdef __cplusplus
}
#endif
#endif