#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
#include <pthread.h>
#include <stdio.h>
Go to the source code of this file.
◆ ECPGdebug
#define ECPGdebug |
( |
|
X, |
|
|
|
Y |
|
) |
| ECPGdebug((X)+100,(Y)) |
◆ PGDLLIMPORT
◆ POSTGRES_SQLCA_H
◆ REPEATS
◆ sqlca
◆ SQLERRMC_LEN
◆ THREADS
◆ ECPGget_sqlca()
struct sqlca_t * ECPGget_sqlca |
( |
void |
| ) |
|
Definition at line 108 of file misc.c.
109{
111
113
116 {
119 return NULL;
122 }
124}
static pthread_key_t sqlca_key
void ecpg_init_sqlca(struct sqlca_t *sqlca)
static void ecpg_sqlca_key_init(void)
static pthread_once_t sqlca_key_once
void pthread_setspecific(pthread_key_t key, void *val)
void * pthread_getspecific(pthread_key_t key)
◆ fn()
static void * fn |
( |
void * |
arg | ) |
|
|
static |
◆ main()
Definition at line 128 of file thread-descriptor.c.
129{
131#ifdef WIN32
133#else
135#endif
136
137#ifdef WIN32
139 {
140 unsigned id;
141 threads[
i] = (HANDLE)_beginthreadex(NULL, 0,
fn, NULL, 0, &
id);
142 }
143
144 WaitForMultipleObjects(
THREADS, threads, TRUE, INFINITE);
146 CloseHandle(threads[
i]);
147#else
149 pthread_create(&threads[
i], NULL,
fn, NULL);
151 pthread_join(threads[
i], NULL);
152#endif
153
154 return 0;
155}
static void * fn(void *arg)
References fn(), i, and THREADS.