File: sequence.c

package info (click to toggle)
lam 7.1.4-8
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 56,404 kB
  • sloc: ansic: 156,541; sh: 9,991; cpp: 7,699; makefile: 5,621; perl: 488; fortran: 260; asm: 83
file content (104 lines) | stat: -rw-r--r-- 2,072 bytes parent folder | download | duplicates (11)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/*
 * Copyright (c) 2001-2003 The Trustees of Indiana University.  
 *                         All rights reserved.
 * Copyright (c) 1998-2001 University of Notre Dame. 
 *                         All rights reserved.
 * Copyright (c) 1994-1998 The Ohio State University.  
 *                         All rights reserved.
 * 
 * This file is part of the LAM/MPI software package.  For license
 * information, see the LICENSE file in the top level directory of the
 * LAM/MPI source distribution.
 * 
 * $HEADER$
 *
 * $Id: sequence.c,v 1.5 2003/02/04 17:51:30 jsquyres Exp $
 *
 *	Function:	- network functions for talking to local LAM ranks
 */

#include <lam_config.h>
#if LAM_WANT_IMPI

#include <stdio.h>
#include <impi-defs.h>


/*
 * private variables
 */
static IMPI_Uint8 seqnum = (IMPI_Uint8) 1;
static IMPI_Uint8 srqid = (IMPI_Uint8) 1;
static IMPI_Uint8 drqid = (IMPI_Uint8) 1;
static IMPI_Uint8 cid = (IMPI_Uint8) 32; /* There are several
communicators already defined, and we can't collide */


IMPI_Uint8
get_new_seqnum()
{
  /* We will need to someday ensure that we don't collide with
     sequence numbers that haven't been released */

  return seqnum++;
}

void
release_seqnum(IMPI_Uint8 seq)
{
  /* Need to put something here to release this sequence number */
}


IMPI_Uint8
get_new_srqid()
{
  /* We will need to someday ensure that we don't collide with srqid's
     that haven't been released */

  return srqid++;
}


void
release_srqid(IMPI_Uint8 seq)
{
  /* Need to put something here to release this srqid */
}


IMPI_Uint8
get_new_drqid()
{
  /* We will need to someday ensure that we don't collide with drqid's
     that haven't been released */

  return drqid++;
}


void
release_drqid(IMPI_Uint8 seq)
{
  /* Need to put something here to release this drqid */
}


IMPI_Uint8
get_new_localcid()
{
  /* We will need to someday ensure that we don't collide with local
     cid's that haven't been released */

  return cid++;
}


void
release_localcid(IMPI_Uint8 seq)
{
  /* Need to put something here to release this local cid */
}


#endif