File: rfio_apiinit.c

package info (click to toggle)
dpm-postgres 1.7.4.7-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 13,788 kB
  • ctags: 10,782
  • sloc: ansic: 146,136; sh: 13,362; perl: 11,142; python: 5,529; cpp: 5,113; sql: 1,790; makefile: 955; fortran: 113
file content (31 lines) | stat: -rw-r--r-- 703 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * Copyright (C) 2005 by CERN/IT/GD/CT
 * All rights reserved
 */
 
#ifndef lint
static char sccsid[] = "@(#)$RCSfile: rfio_apiinit.c,v $ $Revision: 1.1 $ $Date: 2005/05/20 14:34:36 $ CERN IT-GD/CT Jean-Philippe Baud";
#endif /* not lint */

/*	rfio_apiinit - allocate thread specific or global structures */

#include <errno.h>
#include <stdlib.h>
#include <sys/types.h>
#include "Cglobals.h"
#include "rfio_api.h"
#include "serrno.h"
static int rfio_api_key = -1;

int DLL_DECL
rfio_apiinit(thip)
struct rfio_api_thread_info **thip;
{
	Cglobals_get (&rfio_api_key,
	    (void **) thip, sizeof(struct rfio_api_thread_info));
	if (*thip == NULL) {
		serrno = ENOMEM;
		return (-1);
	}
	return (0);
}