File tree Expand file tree Collapse file tree 4 files changed +59
-5
lines changed Expand file tree Collapse file tree 4 files changed +59
-5
lines changed Original file line number Diff line number Diff line change 10
10
* Portions Copyright (c) 1994, Regents of the University of California
11
11
*
12
12
* IDENTIFICATION
13
- * $Header: /cvsroot/pgsql/src/backend/port/sysv_shmem.c,v 1.5 2003/03/25 16:15:44 petere Exp $
13
+ * $Header: /cvsroot/pgsql/src/backend/port/sysv_shmem.c,v 1.6 2003/04/24 21:23:01 momjian Exp $
14
14
*
15
15
*-------------------------------------------------------------------------
16
16
*/
30
30
#include <kernel/OS.h>
31
31
#endif
32
32
33
+ #ifdef WIN32
34
+ #include "win32/shmem.h"
35
+ #endif
36
+
33
37
#include "miscadmin.h"
34
38
#include "storage/ipc.h"
35
39
#include "storage/pg_shmem.h"
Original file line number Diff line number Diff line change 1
1
/*-------------------------------------------------------------------------
2
2
*
3
- * sem .c
3
+ * sema .c
4
4
* Microsoft Windows Win32 Semaphores Emulation
5
5
*
6
6
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
10
10
11
11
#include "postgres.h"
12
12
#include "storage/shmem.h"
13
+ #include "sema.h"
13
14
14
15
#include <errno.h>
15
16
Original file line number Diff line number Diff line change 1
1
/*-------------------------------------------------------------------------
2
2
*
3
- * shm .c
3
+ * shmem .c
4
4
* Microsoft Windows Win32 Shared Memory Emulation
5
5
*
6
6
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
9
9
*/
10
10
11
11
#include "postgres.h"
12
- #include "windows.h"
13
12
14
13
#include <stdio.h>
15
14
#include <errno.h>
Original file line number Diff line number Diff line change 1
- /* $Header: /cvsroot/pgsql/src/include/port/win32.h,v 1.7 2003/04/18 01:03:42 momjian Exp $ */
1
+ /* $Header: /cvsroot/pgsql/src/include/port/win32.h,v 1.8 2003/04/24 21:23:01 momjian Exp $ */
2
2
3
3
#include <port/win32defs.h>
4
4
32
32
33
33
#endif
34
34
35
+ /*
36
+ * IPC defines
37
+ */
38
+ #define IPC_RMID 256
39
+ #define IPC_CREAT 512
40
+ #define IPC_EXCL 1024
41
+ #define IPC_PRIVATE 234564
42
+ #define IPC_NOWAIT 2048
43
+ #define IPC_STAT 4096
44
+
45
+
46
+ /*
47
+ * Shared memory
48
+ */
49
+ struct shmid_ds
50
+ {
51
+ int dummy ;
52
+ int shm_nattch ;
53
+ };
54
+
55
+ int shmdt (const void * shmaddr );
56
+ void * shmat (int memId , void * shmaddr , int flag );
57
+ int shmctl (int shmid , int flag , struct shmid_ds * dummy );
58
+ int shmget (int memKey , int size , int flag );
59
+
60
+
61
+ /*
62
+ * Semaphores
63
+ */
64
+ union semun
65
+ {
66
+ int val ;
67
+ struct semid_ds * buf ;
68
+ unsigned short * array ;
69
+ };
70
+
71
+ struct sembuf
72
+ {
73
+ int sem_flg ;
74
+ int sem_op ;
75
+ int sem_num ;
76
+ };
77
+
78
+ int semctl (int semId , int semNum , int flag , union semun );
79
+ int semget (int semKey , int semNum , int flags );
80
+ int semop (int semId , struct sembuf * sops , int flag );
81
+
82
+
83
+ /* FROM SRA */
84
+
35
85
/*
36
86
* Supplement to <sys/types.h>.
37
87
*/
You can’t perform that action at this time.
0 commit comments