Skip to content

Commit

Permalink
Fixed 32bit make target to work on Linux out of the box
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed Feb 22, 2010
1 parent 12d090d commit 9ebed7c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ log:
git log '--pretty=format:%ad %s' --date=short > Changelog

32bit:
make ARCH="-arch i386"
@echo ""
@echo "WARNING: if it fails under Linux you probably need to install libc6-dev-i386"
@echo ""
make ARCH="-m32"

gprof:
make PROF="-pg"
Expand Down
14 changes: 7 additions & 7 deletions redis.c
Original file line number Diff line number Diff line change
Expand Up @@ -7406,7 +7406,7 @@ static int vmWriteObjectOnSwap(robj *o, off_t page) {
if (fseeko(server.vm_fp,page*server.vm_page_size,SEEK_SET) == -1) {
if (server.vm_enabled) pthread_mutex_unlock(&server.io_swapfile_mutex);
redisLog(REDIS_WARNING,
"Critical VM problem in vmSwapObjectBlocking(): can't seek: %s",
"Critical VM problem in vmWriteObjectOnSwap(): can't seek: %s",
strerror(errno));
return REDIS_ERR;
}
Expand Down Expand Up @@ -7922,8 +7922,8 @@ static void *IOThreadEntryPoint(void *arg) {
lockThreadedIO();
if (listLength(server.io_newjobs) == 0) {
/* No new jobs in queue, exit. */
redisLog(REDIS_DEBUG,"Thread %lld exiting, nothing to do",
(long long) pthread_self());
redisLog(REDIS_DEBUG,"Thread %ld exiting, nothing to do",
(long) pthread_self());
server.io_active_threads--;
unlockThreadedIO();
return NULL;
Expand All @@ -7936,8 +7936,8 @@ static void *IOThreadEntryPoint(void *arg) {
listAddNodeTail(server.io_processing,j);
ln = listLast(server.io_processing); /* We use ln later to remove it */
unlockThreadedIO();
redisLog(REDIS_DEBUG,"Thread %lld got a new job (type %d): %p about key '%s'",
(long long) pthread_self(), j->type, (void*)j, (char*)j->key->ptr);
redisLog(REDIS_DEBUG,"Thread %ld got a new job (type %d): %p about key '%s'",
(long) pthread_self(), j->type, (void*)j, (char*)j->key->ptr);

/* Process the Job */
if (j->type == REDIS_IOJOB_LOAD) {
Expand All @@ -7952,8 +7952,8 @@ static void *IOThreadEntryPoint(void *arg) {
}

/* Done: insert the job into the processed queue */
redisLog(REDIS_DEBUG,"Thread %lld completed the job: %p (key %s)",
(long long) pthread_self(), (void*)j, (char*)j->key->ptr);
redisLog(REDIS_DEBUG,"Thread %ld completed the job: %p (key %s)",
(long) pthread_self(), (void*)j, (char*)j->key->ptr);
lockThreadedIO();
listDelNode(server.io_processing,ln);
listAddNodeTail(server.io_processed,j);
Expand Down
3 changes: 2 additions & 1 deletion test-redis.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,7 @@ proc main {server port} {
$r sort tosort {DESC}
} [lsort -decreasing -integer $res]

while 1 {
test {SORT speed, sorting 10000 elements list using BY, 100 times} {
set start [clock clicks -milliseconds]
for {set i 0} {$i < 100} {incr i} {
Expand All @@ -962,7 +963,7 @@ proc main {server port} {
flush stdout
format {}
} {}

}
test {SORT speed, sorting 10000 elements list directly, 100 times} {
set start [clock clicks -milliseconds]
for {set i 0} {$i < 100} {incr i} {
Expand Down

0 comments on commit 9ebed7c

Please sign in to comment.