Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit20ead39

Browse files
committed
Add Win32 shmem/sema prototypes.
1 parentf690920 commit20ead39

File tree

4 files changed

+59
-5
lines changed

4 files changed

+59
-5
lines changed

‎src/backend/port/sysv_shmem.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Portions Copyright (c) 1994, Regents of the University of California
1111
*
1212
* 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 $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -30,6 +30,10 @@
3030
#include<kernel/OS.h>
3131
#endif
3232

33+
#ifdefWIN32
34+
#include"win32/shmem.h"
35+
#endif
36+
3337
#include"miscadmin.h"
3438
#include"storage/ipc.h"
3539
#include"storage/pg_shmem.h"

‎src/backend/port/win32/sem.crenamed to‎src/backend/port/win32/sema.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*-------------------------------------------------------------------------
22
*
3-
*sem.c
3+
*sema.c
44
* Microsoft Windows Win32 Semaphores Emulation
55
*
66
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
@@ -10,6 +10,7 @@
1010

1111
#include"postgres.h"
1212
#include"storage/shmem.h"
13+
#include"sema.h"
1314

1415
#include<errno.h>
1516

‎src/backend/port/win32/shm.crenamed to‎src/backend/port/win32/shmem.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*-------------------------------------------------------------------------
22
*
3-
*shm.c
3+
*shmem.c
44
* Microsoft Windows Win32 Shared Memory Emulation
55
*
66
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
@@ -9,7 +9,6 @@
99
*/
1010

1111
#include"postgres.h"
12-
#include"windows.h"
1312

1413
#include<stdio.h>
1514
#include<errno.h>

‎src/include/port/win32.h

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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 $ */
22

33
#include<port/win32defs.h>
44

@@ -32,6 +32,56 @@
3232

3333
#endif
3434

35+
/*
36+
*IPC defines
37+
*/
38+
#defineIPC_RMID 256
39+
#defineIPC_CREAT 512
40+
#defineIPC_EXCL 1024
41+
#defineIPC_PRIVATE 234564
42+
#defineIPC_NOWAIT2048
43+
#defineIPC_STAT 4096
44+
45+
46+
/*
47+
*Shared memory
48+
*/
49+
structshmid_ds
50+
{
51+
intdummy;
52+
intshm_nattch;
53+
};
54+
55+
intshmdt(constvoid*shmaddr);
56+
void*shmat(intmemId,void*shmaddr,intflag);
57+
intshmctl(intshmid,intflag,structshmid_ds*dummy);
58+
intshmget(intmemKey,intsize,intflag);
59+
60+
61+
/*
62+
*Semaphores
63+
*/
64+
unionsemun
65+
{
66+
intval;
67+
structsemid_ds*buf;
68+
unsigned short*array;
69+
};
70+
71+
structsembuf
72+
{
73+
intsem_flg;
74+
intsem_op;
75+
intsem_num;
76+
};
77+
78+
intsemctl(intsemId,intsemNum,intflag,unionsemun);
79+
intsemget(intsemKey,intsemNum,intflags);
80+
intsemop(intsemId,structsembuf*sops,intflag);
81+
82+
83+
/* FROM SRA */
84+
3585
/*
3686
* Supplement to <sys/types.h>.
3787
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp