parent
b23b5789fb
commit
eae16b82d3
2 changed files with 33 additions and 35 deletions
|
@ -1,28 +1,28 @@
|
||||||
/*
|
/*
|
||||||
* This file is a part of Pcompress, a chunked parallel multi-
|
* This file is a part of Pcompress, a chunked parallel multi-
|
||||||
* algorithm lossless compression and decompression program.
|
* algorithm lossless compression and decompression program.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012-2013 Moinak Ghosh. All rights reserved.
|
* Copyright (C) 2012-2013 Moinak Ghosh. All rights reserved.
|
||||||
* Use is subject to license terms.
|
* Use is subject to license terms.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* License as published by the Free Software Foundation; either
|
* License as published by the Free Software Foundation; either
|
||||||
* version 3 of the License, or (at your option) any later version.
|
* version 3 of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* License along with this program.
|
* License along with this program.
|
||||||
* If not, see <http://www.gnu.org/licenses/>.
|
* If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* moinakg@belenix.org, http://moinakg.wordpress.com/
|
* moinakg@belenix.org, http://moinakg.wordpress.com/
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* LzmaEnc.c -- LZMA Encoder
|
/* LzmaEnc.c -- LZMA Encoder
|
||||||
2010-04-16 : Igor Pavlov : Public domain */
|
2010-04-16 : Igor Pavlov : Public domain */
|
||||||
|
|
||||||
|
@ -83,8 +83,7 @@ static int ttt = 0;
|
||||||
"movntiq %[val], (%[ptr1]);"\
|
"movntiq %[val], (%[ptr1]);"\
|
||||||
"movntiq %[val], 0x8(%[ptr1]);"\
|
"movntiq %[val], 0x8(%[ptr1]);"\
|
||||||
: \
|
: \
|
||||||
: [ptr1] "q" (mem), [val] "q" (val) \
|
: [ptr1] "q" (mem), [val] "q" (val) )
|
||||||
:)
|
|
||||||
#define MOV_DBL_QUAD_UNALIGNED(mem, val) \
|
#define MOV_DBL_QUAD_UNALIGNED(mem, val) \
|
||||||
*((UInt64 *)(mem)) = val; *((UInt64 *)((Byte *)mem + 8)) = val
|
*((UInt64 *)(mem)) = val; *((UInt64 *)((Byte *)mem + 8)) = val
|
||||||
|
|
||||||
|
@ -94,8 +93,7 @@ static int ttt = 0;
|
||||||
"movntiq %[val], 0x10(%[ptr1]);"\
|
"movntiq %[val], 0x10(%[ptr1]);"\
|
||||||
"movntiq %[val], 0x18(%[ptr1]);"\
|
"movntiq %[val], 0x18(%[ptr1]);"\
|
||||||
: \
|
: \
|
||||||
: [ptr1] "q" (mem), [val] "q" (val) \
|
: [ptr1] "q" (mem), [val] "q" (val) )
|
||||||
:)
|
|
||||||
#define MOV_QUAD_QUAD_UNALIGNED(mem, val) \
|
#define MOV_QUAD_QUAD_UNALIGNED(mem, val) \
|
||||||
*((UInt64 *)(mem)) = val; *((UInt64 *)((Byte *)mem + 8)) = val; \
|
*((UInt64 *)(mem)) = val; *((UInt64 *)((Byte *)mem + 8)) = val; \
|
||||||
*((UInt64 *)((Byte *)mem + 16)) = val; *((UInt64 *)((Byte *)mem + 24)) = val
|
*((UInt64 *)((Byte *)mem + 16)) = val; *((UInt64 *)((Byte *)mem + 24)) = val
|
||||||
|
|
|
@ -291,6 +291,12 @@ init_global_db_s(char *path, char *tmppath, uint32_t chunksize, uint64_t user_ch
|
||||||
cfg->seg_fd_r[i].mapping = NULL;
|
cfg->seg_fd_r[i].mapping = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Remove tempfile entry from the filesystem metadata so that file gets
|
||||||
|
* automatically removed once process exits.
|
||||||
|
*/
|
||||||
|
unlink(cfg->rootdir);
|
||||||
|
|
||||||
if (errored) {
|
if (errored) {
|
||||||
cleanup_indx(indx);
|
cleanup_indx(indx);
|
||||||
if (cfg->seg_fd_r)
|
if (cfg->seg_fd_r)
|
||||||
|
@ -298,12 +304,6 @@ init_global_db_s(char *path, char *tmppath, uint32_t chunksize, uint64_t user_ch
|
||||||
free(cfg);
|
free(cfg);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Remove tempfile entry from the filesystem metadata so that file gets
|
|
||||||
* automatically removed once process exits.
|
|
||||||
*/
|
|
||||||
unlink(cfg->rootdir);
|
|
||||||
}
|
}
|
||||||
cfg->segcache_pos = 0;
|
cfg->segcache_pos = 0;
|
||||||
cfg->dbdata = indx;
|
cfg->dbdata = indx;
|
||||||
|
|
Loading…
Reference in a new issue