对pg_latch.c 的来源探索
开始
pg_lath.c 是后期生成的。
configure 脚本中有如下的信息:
# Select latch implementation type. if test "$PORTNAME" != "win32"; then LATCH_IMPLEMENTATION="src/backend/port/unix_latch.c" else LATCH_IMPLEMENTATION="src/backend/port/win32_latch.c" fi ac_config_links="$ac_config_links src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION} src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION} src/backend/port/pg_latch.c:${LATCH_IMPLEMENTATION} src/include/dynloader.h:src/backend/port/dynloader/${template}.h src/include/pg_config_os.h:src/include/port/${template}.h src/Makefile.port:src/makefiles/Makefile.${template}"
当我用的是unix 环境的时候,得到的 pg_latch.c 就是 unix_latch.c
[作者:技术者高健@博客园 mail: luckyjackgao@gmail.com ]
结束