summaryrefslogtreecommitdiffstats
path: root/private/os2/os2ses/mon.h
blob: eca9185890bf52085852b6b5ffe266bfed44eb5d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*++

Copyright (c) 1989  Microsoft Corporation

Module Name:

    mon.h

Abstract:

    Prototypes for functions & macros in monrqust.c

Author:

    Michael Jarus (mjarus) 2-Feb-1992

Environment:

    User Mode Only

Revision History:

--*/

/*
 *  Table for all (registered) monitor buffers
 *  <ProcessId>+<Buffer> must be unique.
 */

typedef struct _MON_BUFFER_TABLE
{
    PMON_HEADER MonHeader;
    ULONG       ProcessId;
    PVOID       Buffer;
} MON_BUFFER_TABLE, *PMON_BUFFER_TABLE;

#define MON_BUFFER_TABLE_SIZE  30

MON_BUFFER_TABLE    MonBuffTable[MON_BUFFER_TABLE_SIZE];

/*
 *  Find/Add/Delete a Buffer in/to/from the monitor-buffer-table
 */

DWORD  FindMonitorBuffer(IN  PVOID  Buffer,
                         IN  ULONG  ProcessId);

DWORD  AddMonitorBuffer(IN  PVOID        Buffer,
                        IN  PMON_HEADER  MonHeader,
                        IN  ULONG        ProcessId);

DWORD  DelMonitorBuffer(IN  PMON_HEADER  MonHeader);

/*
 *  Add/Remove the monitor-queue to/from the device chain
 */

DWORD  AddMonitor(IN  PMON_HEADER  NewMonHeader,
                  IN  PMON_HEADER  *pMonQueue);

DWORD  RemoveMonitor(IN  PMON_HEADER  OldMonHeader,
                     IN  PMON_HEADER  *pMonQueue);

/*
 * Mon internal functions to serve the client requsets.
 */

DWORD  MonOpen(IN  MONDEVNUMBER DevType,
               OUT PHANDLE      hMon);

DWORD  MonReg(IN  PMON_REG MonReg);

DWORD  MonRead(IN OUT PMON_RW rwParms,
               OUT    PULONG  pReply,
               IN     PVOID   pMsg);

DWORD  MonWrite(IN  PMON_RW rwParms,
                OUT PULONG  pReply,
                IN  PVOID   pMsg);

DWORD  MonClose(IN  HANDLE   hMon);