Permalink
Browse files

redis.c split into many different C files.

networking related stuff moved into networking.c

moved more code

more work on layout of source code

SDS instantaneuos memory saving. By Pieter and Salvatore at VMware ;)

cleanly compiling again after the first split, now splitting it in more C files

moving more things around... work in progress

split replication code

splitting more

Sets split

Hash split

replication split

even more splitting

more splitting

minor change
1 parent c2ff0e9 commit e2641e09cc0daf44f63f654230f72d22acf3a9af @antirez committed Jun 21, 2010
Showing with 11,811 additions and 12,084 deletions.
  1. +0 −11,621 redis.c
  2. +0 −75 redis.h
  3. +3 −6 { → src}/Makefile
  4. 0 { → src}/adlist.c
  5. 0 { → src}/adlist.h
  6. 0 { → src}/ae.c
  7. 0 { → src}/ae.h
  8. 0 { → src}/ae_epoll.c
  9. 0 { → src}/ae_kqueue.c
  10. 0 { → src}/ae_select.c
  11. 0 { → src}/anet.c
  12. 0 { → src}/anet.h
  13. +694 −0 src/aof.c
  14. +438 −0 src/config.c
  15. 0 { → src}/config.h
  16. +508 −0 src/db.c
  17. +309 −0 src/debug.c
  18. 0 { → src}/dict.c
  19. 0 { → src}/dict.h
  20. 0 { → src}/fmacros.h
  21. 0 { → src}/linenoise.c
  22. 0 { → src}/linenoise.h
  23. 0 { → src}/lzf.h
  24. 0 { → src}/lzfP.h
  25. 0 { → src}/lzf_c.c
  26. 0 { → src}/lzf_d.c
  27. 0 { → src}/mkreleasehdr.sh
  28. +266 −0 src/multi.c
  29. +589 −0 src/networking.c
  30. +405 −0 src/object.c
  31. 0 { → src}/pqsort.c
  32. 0 { → src}/pqsort.h
  33. +259 −0 src/pubsub.c
  34. +886 −0 src/rdb.c
  35. 0 { → src}/redis-benchmark.c
  36. 0 { → src}/redis-check-aof.c
  37. 0 { → src}/redis-check-dump.c
  38. 0 { → src}/redis-cli.c
  39. +1,516 −0 src/redis.c
  40. +885 −0 src/redis.h
  41. 0 { → src}/release.c
  42. +475 −0 src/replication.c
  43. +26 −1 { → src}/sds.c
  44. +4 −3 { → src}/sds.h
  45. 0 { → src}/sha1.c
  46. 0 { → src}/sha1.h
  47. 0 { → src}/solarisfixes.h
  48. +383 −0 src/sort.c
  49. +397 −0 src/t_hash.c
  50. +829 −0 src/t_list.c
  51. +349 −0 src/t_set.c
  52. +251 −0 src/t_string.c
  53. +985 −0 src/t_zset.c
  54. +223 −0 src/util.c
  55. +1 −0 src/version.h
  56. +1,126 −0 src/vm.c
  57. 0 { → src}/ziplist.c
  58. 0 { → src}/ziplist.h
  59. 0 { → src}/zipmap.c
  60. 0 { → src}/zipmap.h
  61. 0 { → src}/zmalloc.c
  62. 0 { → src}/zmalloc.h
  63. +0 −374 staticsymbols.h
  64. +2 −2 tests/integration/aof.tcl
  65. +2 −2 tests/support/server.tcl
View
11,621 redis.c
Oops, something went wrong.
View
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2009-2010, Salvatore Sanfilippo <antirez at gmail dot com>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Redis nor the names of its contributors may be used
- * to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __REDIS_H__
-#define __REDIS_H__
-
-enum
-{
- REG_GS = 0,
-# define REG_GS REG_GS
- REG_FS,
-# define REG_FS REG_FS
- REG_ES,
-# define REG_ES REG_ES
- REG_DS,
-# define REG_DS REG_DS
- REG_EDI,
-# define REG_EDI REG_EDI
- REG_ESI,
-# define REG_ESI REG_ESI
- REG_EBP,
-# define REG_EBP REG_EBP
- REG_ESP,
-# define REG_ESP REG_ESP
- REG_EBX,
-# define REG_EBX REG_EBX
- REG_EDX,
-# define REG_EDX REG_EDX
- REG_ECX,
-# define REG_ECX REG_ECX
- REG_EAX,
-# define REG_EAX REG_EAX
- REG_TRAPNO,
-# define REG_TRAPNO REG_TRAPNO
- REG_ERR,
-# define REG_ERR REG_ERR
- REG_EIP,
-# define REG_EIP REG_EIP
- REG_CS,
-# define REG_CS REG_CS
- REG_EFL,
-# define REG_EFL REG_EFL
- REG_UESP,
-# define REG_UESP REG_UESP
- REG_SS
-# define REG_SS REG_SS
-};
-
-#endif
@@ -15,7 +15,7 @@ endif
CCOPT= $(CFLAGS) $(CCLINK) $(ARCH) $(PROF)
DEBUG?= -g -rdynamic -ggdb
-OBJ = adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o
+OBJ = adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o vm.o pubsub.o multi.o debug.o sort.o
BENCHOBJ = ae.o anet.o redis-benchmark.o sds.o adlist.o zmalloc.o
CLIOBJ = anet.o sds.o adlist.o redis-cli.o zmalloc.o linenoise.o
CHECKDUMPOBJ = redis-check-dump.o lzf_c.o lzf_d.o
@@ -48,7 +48,7 @@ redis-check-dump.o: redis-check-dump.c lzf.h
redis-cli.o: redis-cli.c fmacros.h anet.h sds.h adlist.h zmalloc.h \
linenoise.h
redis.o: redis.c fmacros.h config.h redis.h ae.h sds.h anet.h dict.h \
- adlist.h zmalloc.h lzf.h pqsort.h zipmap.h ziplist.h sha1.h staticsymbols.h
+ adlist.h zmalloc.h lzf.h pqsort.h zipmap.h ziplist.h sha1.h
release.o: release.c release.h
sds.o: sds.c sds.h zmalloc.h
sha1.o: sha1.c sha1.h
@@ -83,11 +83,8 @@ clean:
dep:
$(CC) -MM *.c
-staticsymbols:
- tclsh utils/build-static-symbols.tcl > staticsymbols.h
-
test:
- tclsh8.5 tests/test_helper.tcl --tags "${TAGS}"
+ (cd ..; tclsh8.5 tests/test_helper.tcl --tags "${TAGS}")
bench:
./redis-benchmark
File renamed without changes.
File renamed without changes.
View
File renamed without changes.
View
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.

0 comments on commit e2641e0

Please sign in to comment.