浏览代码

HPCC-9017 Use less kernel page cache for roxie copies, update5

Signed-off-by: Mark Kelly <mark.kelly@lexisnexis.com>
Mark Kelly 11 年之前
父节点
当前提交
e8646137e0
共有 2 个文件被更改,包括 10 次插入1 次删除
  1. 1 1
      system/jlib/jfile.cpp
  2. 9 0
      system/jlib/jiface.cpp

+ 1 - 1
system/jlib/jfile.cpp

@@ -2821,7 +2821,7 @@ void copyFile(const char *target, const char *source, size32_t buffersize, ICopy
 
 void copyFile(IFile * target, IFile * source, size32_t buffersize, ICopyFileProgress *progress, CFflags copyFlags)
 {
-    source->copyTo(target,buffersize,progress,copyFlags);
+    source->copyTo(target, buffersize, progress, copyFlags);
 }
 
 void doCopyFile(IFile * target, IFile * source, size32_t buffersize, ICopyFileProgress *progress, ICopyFileIntercept *copyintercept, bool usetmp, CFflags copyFlags)

+ 9 - 0
system/jlib/jiface.cpp

@@ -75,6 +75,15 @@ void poor_atomic_add(atomic_t * v, int i)
     ICrit->leave();
 }
 
+int poor_atomic_add_and_read(atomic_t * v, int i)
+{
+    ICrit->enter();
+    (*v) += i;
+    int ret = (*v);
+    ICrit->leave();
+    return ret;
+}
+
 int poor_atomic_add_exchange(atomic_t * v, int i)       
 {
     ICrit->enter();