Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
95178c8d
Commit
95178c8d
authored
Apr 23, 2004
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Report error if thread-test is run without having threading enabled in
configure.
parent
66b42d30
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
src/tools/thread/thread_test.c
src/tools/thread/thread_test.c
+19
-3
No files found.
src/tools/thread/thread_test.c
View file @
95178c8d
...
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/tools/thread/thread_test.c,v 1.2
1 2004/04/23 20:35:50
momjian Exp $
* $PostgreSQL: pgsql/src/tools/thread/thread_test.c,v 1.2
2 2004/04/23 22:21:49
momjian Exp $
*
* This program tests to see if your standard libc functions use
* pthread_setspecific()/pthread_getspecific() to be thread-safe.
...
...
@@ -20,10 +20,10 @@
*-------------------------------------------------------------------------
*/
#include <pthread.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <netdb.h>
#include <sys/types.h>
#include <pwd.h>
...
...
@@ -33,6 +33,20 @@
#include "postgres.h"
#ifndef ENABLE_THREAD_SAFETY
int
main
(
int
argc
,
char
*
argv
[])
{
fprintf
(
stderr
,
"This PostgreSQL build does not support threads.
\n
"
);
fprintf
(
stderr
,
"Perhaps rerun 'configure' using '--enable-thread-safety'.
\n
"
);
return
1
;
}
#else
/* This must be down here because this is the code that uses threads. */
#include "pthread.h"
void
func_call_1
(
void
);
void
func_call_2
(
void
);
...
...
@@ -311,3 +325,5 @@ func_call_2(void)
pthread_mutex_lock
(
&
init_mutex
);
/* wait for parent to test */
pthread_mutex_unlock
(
&
init_mutex
);
}
#endif
/* !ENABLE_THREAD_SAFETY */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment