1KSTATE(2)                      LAM LOCAL LIBRARY                     KSTATE(2)
2
3
4

NAME

6       kstate - Get synchronization status of a LAM process.
7

SYNOPSIS

9       #include <kreq.h>
10
11       int kstate (int pid, struct kstatus *status);
12

DESCRIPTION

14       The  function  kstate() enables a LAM process to inquire about the syn‐
15       chronization status of any process on the local node, including itself.
16       The  argument  pid  is the identifier of the process to be stated.  The
17       special  identifier  0  indicates  the  calling  process.   Information
18       returned  from  the daemon will be stored in the structure addressed by
19       the status argument.  The structure is defined  in  <kreq.h>  as  shown
20       below.
21
22            struct kstatus {
23                 int  ks_state;
24                 int  ks_priority;
25                 int  ks_event;
26                 int  ks_type;
27                 int  ks_signal;
28                 int  ks_flags;
29                 int  ks_length;
30                 int  ks_fyi[KNFYI];
31            };
32
33       Upon  return  from  kstate(), the individual fields are filled with the
34       information described below.
35
36       ks_state       scheduling status (see below)
37
38       ks_priority    synchronization priority (see kenter(2))
39
40       ks_event       currently blocked or last used message event
41
42       ks_type        currently blocked or last used message type
43
44       ks_signal      pending signals to be delivered
45
46       ks_flags       internal process management flags
47
48       ks_length      currently blocked or last used message length
49
50       ks_fyi         application specific information
51
52       The process states, defined in <kreq.h>, are described below.
53
54       KSREADY        ready to run
55
56       KSRECV         blocked on krecv(2) to receive a message
57
58       KSSEND         blocked on ksend(2) to send a message
59

ERRORS

61       ENOTPROCESS    The process  whose  process  identifier  was  passed  to
62                      kstate() is not a LAM process.
63
64       ENOTATTACHED   The calling process is not a LAM process.
65

SEE ALSO

67       rpstate(2)
68
69
70
71LAM 7.1.2                         March, 2006                        KSTATE(2)
Impressum