~vorlon/ubuntu/natty/eglibc/multiarch

« back to all changes in this revision

Viewing changes to stdlib/msort.c

  • Committer: Steve Langasek
  • Date: 2011-02-18 21:18:44 UTC
  • mfrom: (103.1.7 eglibc)
  • Revision ID: steve.langasek@linaro.org-20110218211844-lodmi8b1qhyq3f3x
Tags: 2.13~pre1-0ubuntu1+multiarch.1
merge from natty

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include <unistd.h>
26
26
#include <memcopy.h>
27
27
#include <errno.h>
 
28
#include <atomic.h>
28
29
 
29
30
struct msort_param
30
31
{
182
183
      static long int phys_pages;
183
184
      static int pagesize;
184
185
 
185
 
      if (phys_pages == 0)
 
186
      if (pagesize == 0)
186
187
        {
187
188
          phys_pages = __sysconf (_SC_PHYS_PAGES);
188
189
 
197
198
             a quarter of the physical memory.  */
198
199
          phys_pages /= 4;
199
200
 
 
201
          /* Make sure phys_pages is written to memory.  */
 
202
          atomic_write_barrier ();
 
203
 
200
204
          pagesize = __sysconf (_SC_PAGESIZE);
201
205
        }
202
206