1997-02-05 22:27:04 +01:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Makefile--
|
|
|
|
# Makefile for the port-specific subsystem of the backend
|
|
|
|
#
|
|
|
|
# We have two different modes of operation: 1) put stuff specific to Port X
|
|
|
|
# in subdirectory X and have that subdirectory's make file make it all, and
|
|
|
|
# 2) use conditional statements in the present make file to include what's
|
|
|
|
# necessary for a specific port in our own output. (1) came first, but (2)
|
|
|
|
# is superior for many things, like when the same thing needs to be done for
|
|
|
|
# multiple ports and you don't want to duplicate files in multiple
|
|
|
|
# subdirectories. Much of the stuff done via Method 1 today should probably
|
|
|
|
# be converted to Method 2.
|
|
|
|
#
|
|
|
|
# IDENTIFICATION
|
Introduce latches. A latch is a boolean variable, with the capability to
wait until it is set. Latches can be used to reliably wait until a signal
arrives, which is hard otherwise because signals don't interrupt select()
on some platforms, and even when they do, there's race conditions.
On Unix, latches use the so called self-pipe trick under the covers to
implement the sleep until the latch is set, without race conditions. On
Windows, Windows events are used.
Use the new latch abstraction to sleep in walsender, so that as soon as
a transaction finishes, walsender is woken up to immediately send the WAL
to the standby. This reduces the latency between master and standby, which
is good.
Preliminary work by Fujii Masao. The latch implementation is by me, with
helpful comments from many people.
2010-09-11 17:48:04 +02:00
|
|
|
# $PostgreSQL: pgsql/src/backend/port/Makefile,v 1.29 2010/09/11 15:48:04 heikki Exp $
|
1997-02-05 22:27:04 +01:00
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
2000-08-31 18:12:35 +02:00
|
|
|
subdir = src/backend/port
|
|
|
|
top_builddir = ../../..
|
|
|
|
include $(top_builddir)/src/Makefile.global
|
1997-02-05 22:27:04 +01:00
|
|
|
|
Introduce latches. A latch is a boolean variable, with the capability to
wait until it is set. Latches can be used to reliably wait until a signal
arrives, which is hard otherwise because signals don't interrupt select()
on some platforms, and even when they do, there's race conditions.
On Unix, latches use the so called self-pipe trick under the covers to
implement the sleep until the latch is set, without race conditions. On
Windows, Windows events are used.
Use the new latch abstraction to sleep in walsender, so that as soon as
a transaction finishes, walsender is woken up to immediately send the WAL
to the standby. This reduces the latency between master and standby, which
is good.
Preliminary work by Fujii Masao. The latch implementation is by me, with
helpful comments from many people.
2010-09-11 17:48:04 +02:00
|
|
|
OBJS = dynloader.o pg_sema.o pg_shmem.o pg_latch.o $(TAS)
|
2002-03-13 01:05:06 +01:00
|
|
|
|
2000-12-11 01:49:54 +01:00
|
|
|
ifeq ($(PORTNAME), darwin)
|
2008-02-19 16:29:58 +01:00
|
|
|
SUBDIRS += darwin
|
2000-12-11 01:49:54 +01:00
|
|
|
endif
|
2003-05-15 18:35:30 +02:00
|
|
|
ifeq ($(PORTNAME), win32)
|
2008-02-19 16:29:58 +01:00
|
|
|
SUBDIRS += win32
|
2003-05-15 18:35:30 +02:00
|
|
|
endif
|
2000-12-11 01:49:54 +01:00
|
|
|
|
2008-02-19 11:30:09 +01:00
|
|
|
include $(top_srcdir)/src/backend/common.mk
|
1997-02-05 22:27:04 +01:00
|
|
|
|
2000-05-11 19:46:35 +02:00
|
|
|
tas.o: tas.s
|
2008-10-29 17:06:47 +01:00
|
|
|
ifeq ($(SUN_STUDIO_CC), yes)
|
|
|
|
# preprocess assembler file with cpp
|
2006-04-28 19:09:16 +02:00
|
|
|
$(CC) $(CFLAGS) -c -P $<
|
|
|
|
mv $*.i $*_cpp.s
|
|
|
|
$(CC) $(CFLAGS) -c $*_cpp.s -o $@
|
|
|
|
else
|
2000-10-20 23:04:27 +02:00
|
|
|
$(CC) $(CFLAGS) -c $<
|
2006-04-28 19:09:16 +02:00
|
|
|
endif
|
2000-05-11 19:46:35 +02:00
|
|
|
|
2002-05-05 18:02:37 +02:00
|
|
|
# IPC test program
|
2002-07-27 22:10:05 +02:00
|
|
|
ipc_test: ipc_test.o pg_sema.o pg_shmem.o
|
2010-07-05 20:54:38 +02:00
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_EX) $(export_dynamic) $^ $(LIBS) -o $@
|
2002-05-05 18:02:37 +02:00
|
|
|
|
1997-12-20 05:43:20 +01:00
|
|
|
distclean clean:
|
2008-02-19 11:30:09 +01:00
|
|
|
rm -f ipc_test ipc_test.o tas_cpp.s
|
2000-12-11 01:49:54 +01:00
|
|
|
$(MAKE) -C darwin clean
|
2003-05-15 18:35:30 +02:00
|
|
|
$(MAKE) -C win32 clean
|