File: rfio_apiinit.c

package info (click to toggle)
lcgdm 1.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 14,044 kB
  • sloc: ansic: 149,126; sh: 13,441; perl: 11,498; python: 5,778; cpp: 5,113; sql: 1,805; makefile: 1,388; 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);
}