dblock.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these libraries and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /* $XConsortium: dblock.h /main/2 1996/05/09 04:02:57 drk $ */
  24. /*
  25. * COMPONENT_NAME: austext
  26. *
  27. * FUNCTIONS: FCNINIT
  28. *
  29. * ORIGINS: 157
  30. *
  31. */
  32. /* ********************** EDIT HISTORY *******************************
  33. SCR DATE INI DESCRIPTION
  34. ----- --------- --- -----------------------------------------------------
  35. 368 28-Jul-88 RSC Integrate BSD changes into code
  36. 115 16-Aug-88 RSC Integrate VAX/VMS changes into source code
  37. 423 09-Sep-88 RSC Change variables to be compatible with MULTI_TASK
  38. 420 07-Oct-88 RSC Unoptimized use of fl_list (full of bugs)
  39. 441 09-Dec-88 RSC Modified defn of FCNPID for general lockmgr
  40. */
  41. /* Lock Manager/Runtime function interaction */
  42. /* Network Bios Status codes */
  43. #define N_BUSY 0xff
  44. #define N_OKAY 0x00
  45. #define N_TIMEOUT 0x05
  46. #define N_SESCLOSED 0x0a
  47. #define N_DUPNAME 0x0d
  48. #define N_TABFULL 0x11
  49. #define N_OPENREJ 0x12
  50. #define N_CALLNAME 0x14
  51. #define N_NAMEUSED 0x16
  52. #define N_NAMEDEL 0x17
  53. #define N_SESABORT 0x18
  54. #define N_INTFBUSY 0x21
  55. #define N_COMMANDS 0x22
  56. /* Function/Status codes */
  57. #define L_RECOVER -5
  58. #define L_QUEUEFULL -4
  59. #define L_TIMEOUT -3
  60. #define L_UNAVAIL -2
  61. #define L_SYSERR -1
  62. #define L_OKAY 0
  63. #define L_DBOPEN 1
  64. #define L_DBCLOSE 2
  65. #define L_LOCK 3
  66. #define L_FREE 4
  67. #define L_TRCOMMIT 5
  68. #define L_TREND 6
  69. #define L_SETTIME 7
  70. #define L_RECDONE 8
  71. #define L_LOGIN 9
  72. #define L_DELETE 10
  73. #ifndef LOGFILELEN
  74. #define LOGFILELEN 48
  75. #endif
  76. /* Macros for VMS mailbox usage */
  77. typedef struct LM_LOCKREQ_S {
  78. INT fref;
  79. INT type;
  80. } LM_LOCKREQ;
  81. /* Message packets, Runtime to Lock Manager */
  82. /* Some macro / typdefs to make this file much more readable */
  83. #define PERMISSION 0666
  84. #ifdef GENERAL
  85. /* Defines for GENERAL LOCKMGR */
  86. #define FCNPID INT fcn;
  87. #define FCNDEF INT fcn;
  88. #define FCNINIT() 0
  89. typedef char LM_FILEID;
  90. #else /* GENERAL */
  91. /* Defines for UNIX SYS-V */
  92. #define FCNPID LONG fcn;\
  93. int pid;
  94. #define FCNDEF LONG fcn;
  95. #define FCNINIT() 0
  96. /* Defines for both UNIX SYS-V and BSD */
  97. typedef struct LM_FILEID_S {
  98. ino_t inode;
  99. dev_t device;
  100. } LM_FILEID;
  101. #endif /* GENERAL */
  102. typedef struct LM_LOGIN_S {
  103. FCNPID
  104. char dbusrid[80];
  105. } LM_LOGIN;
  106. typedef struct LM_DBOPEN_S {
  107. FCNPID
  108. INT nfiles;
  109. INT type;
  110. LM_FILEID fnames[1];
  111. } LM_DBOPEN;
  112. typedef struct LM_DBCLOSE_S {
  113. FCNPID
  114. INT nfiles;
  115. INT frefs[1];
  116. } LM_DBCLOSE;
  117. typedef struct LM_LOCK_S {
  118. FCNPID
  119. INT nfiles;
  120. LM_LOCKREQ locks[1];
  121. } LM_LOCK;
  122. typedef struct LM_RECOVERED_S {
  123. FCNPID
  124. } LM_RECOVERED;
  125. typedef struct LM_FREE_S {
  126. FCNPID
  127. INT nfiles;
  128. INT frefs[1];
  129. } LM_FREE;
  130. typedef struct LM_TRCOMMIT_S {
  131. FCNPID
  132. char logfile[LOGFILELEN];
  133. } LM_TRCOMMIT;
  134. typedef struct LM_TREND_S {
  135. FCNPID
  136. } LM_TREND;
  137. typedef struct LM_SETTIME_S {
  138. FCNPID
  139. INT secs;
  140. } LM_SETTIME;
  141. /* Message packets, Lock Manager to Runtime */
  142. typedef struct LR_DBOPEN_S {
  143. FCNDEF
  144. INT status;
  145. char logfile[LOGFILELEN];
  146. INT nusers;
  147. INT nfiles;
  148. INT frefs[1];
  149. } LR_DBOPEN;
  150. typedef struct LR_LOCK_S {
  151. FCNDEF
  152. INT status;
  153. char logfile[LOGFILELEN];
  154. } LR_LOCK;
  155. #define DBLOCK_H
  156. /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin dblock.h */