~ubuntu-branches/ubuntu/precise/eglibc/precise-201308281639

« back to all changes in this revision

Viewing changes to sysdeps/pthread/aio_misc.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-02-08 01:58:09 UTC
  • mfrom: (1.5.3) (288.1.12 precise)
  • Revision ID: package-import@ubuntu.com-20120208015809-ulscst7uteq3e22z
Tags: 2.15~pre6-0ubuntu10
Merge from Debian (r5151, 2.13-26).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Handle general operations.
2
 
   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2006, 2007, 2009
 
2
   Copyright (C) 1997-2001, 2003, 2004, 2006, 2007, 2009, 2011
3
3
   Free Software Foundation, Inc.
4
4
   This file is part of the GNU C Library.
5
5
   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
26
26
#include <pthread.h>
27
27
#include <stdlib.h>
28
28
#include <unistd.h>
 
29
#include <sys/param.h>
29
30
#include <sys/stat.h>
30
31
#include <sys/time.h>
31
32
#include <aio_misc.h>
87
88
static struct aioinit optim =
88
89
{
89
90
  20,   /* int aio_threads;     Maximal number of threads.  */
90
 
  64,   /* int aio_num;         Number of expected simultanious requests. */
 
91
  64,   /* int aio_num;         Number of expected simultaneous requests. */
91
92
  0,
92
93
  0,
93
94
  0,
282
283
  if (pool == NULL)
283
284
    {
284
285
      optim.aio_threads = init->aio_threads < 1 ? 1 : init->aio_threads;
 
286
      assert (powerof2 (ENTRIES_PER_ROW));
285
287
      optim.aio_num = (init->aio_num < ENTRIES_PER_ROW
286
288
                       ? ENTRIES_PER_ROW
287
 
                       : init->aio_num & ~ENTRIES_PER_ROW);
 
289
                       : init->aio_num & ~(ENTRIES_PER_ROW - 1));
288
290
    }
289
291
 
290
292
  if (init->aio_idle_time != 0)