~ubuntu-branches/ubuntu/saucy/nwchem/saucy

« back to all changes in this revision

Viewing changes to src/tools/ga-4-3/tcgmsg/ipcv5.0/usleep.c

  • Committer: Package Import Robot
  • Author(s): Michael Banck, Michael Banck, Daniel Leidert
  • Date: 2012-02-09 20:02:41 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120209200241-jgk03qfsphal4ug2
Tags: 6.1-1
* New upstream release.

[ Michael Banck ]
* debian/patches/02_makefile_flags.patch: Updated.
* debian/patches/02_makefile_flags.patch: Use internal blas and lapack code.
* debian/patches/02_makefile_flags.patch: Define GCC4 for LINUX and LINUX64
  (Closes: #632611 and LP: #791308).
* debian/control (Build-Depends): Added openssh-client.
* debian/rules (USE_SCALAPACK, SCALAPACK): Removed variables (Closes:
  #654658).
* debian/rules (LIBDIR, USE_MPIF4, ARMCI_NETWORK): New variables.
* debian/TODO: New file.
* debian/control (Build-Depends): Removed libblas-dev, liblapack-dev and
  libscalapack-mpi-dev.
* debian/patches/04_show_testsuite_diff_output.patch: New patch, shows the
  diff output for failed tests.
* debian/patches/series: Adjusted.
* debian/testsuite: Optionally run all tests if "all" is passed as option.
* debian/rules: Run debian/testsuite with "all" if DEB_BUILD_OPTIONS
  contains "checkall".

[ Daniel Leidert ]
* debian/control: Used wrap-and-sort. Added Vcs-Svn and Vcs-Browser fields.
  (Priority): Moved to extra according to policy section 2.5.
  (Standards-Version): Bumped to 3.9.2.
  (Description): Fixed a typo.
* debian/watch: Added.
* debian/patches/03_hurd-i386_define_path_max.patch: Added.
  - Define MAX_PATH if not defines to fix FTBFS on hurd.
* debian/patches/series: Adjusted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Header: /tmp/hpctools/ga/tcgmsg/ipcv5.0/usleep.c,v 1.4 1997-11-07 23:44:20 d3h325 Exp $ */
 
2
 
 
3
#ifdef AIX
 
4
#include <stdio.h>
 
5
#include <sys/select.h>
 
6
#endif
 
7
#include <sys/types.h>
 
8
#include <sys/time.h>
 
9
 
 
10
#include "tcgmsgP.h"
 
11
 
 
12
#ifndef AIX
 
13
extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
 
14
#endif
 
15
 
 
16
#ifdef STUPIDUSLEEP
 
17
void USleep(us)
 
18
     long us;
 
19
{
 
20
  int s = us/1000000;
 
21
  if (s == 0)
 
22
        s = 1;
 
23
  (void) sleep(s);
 
24
}
 
25
#else
 
26
void USleep(long us)
 
27
/*
 
28
  Sleep for the specified no. of micro-seconds ... uses the timeout
 
29
  on select ... it seems to be accurate to about a few centiseconds
 
30
  on a sun.  I don't know how much system resources it eats.
 
31
*/
 
32
{
 
33
  int width=0;
 
34
  struct timeval timelimit;
 
35
 
 
36
/*  printf("%2ld: sleeping for %ldus\n", TCGMSG_nodeid, us);
 
37
  fflush(stdout);*/
 
38
 
 
39
  timelimit.tv_sec = (int) (us/1000000);
 
40
  timelimit.tv_usec = (int) (us - timelimit.tv_sec*1000000);
 
41
 
 
42
  (void) select(width, (fd_set *) 0, (fd_set *) 0, (fd_set *) 0,
 
43
                &timelimit);
 
44
}
 
45
#endif
 
46