nutcracker 0.2.4.10mac → 0.2.4.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (290) hide show
  1. data/ext/nutcracker/ChangeLog +0 -0
  2. data/ext/nutcracker/LICENSE +0 -0
  3. data/ext/nutcracker/Makefile.am +0 -0
  4. data/ext/nutcracker/Makefile.in +190 -82
  5. data/ext/nutcracker/NOTICE +0 -0
  6. data/ext/nutcracker/README.md +0 -0
  7. data/ext/nutcracker/aclocal.m4 +231 -122
  8. data/ext/nutcracker/conf/nutcracker.leaf.yml +0 -0
  9. data/ext/nutcracker/conf/nutcracker.root.yml +0 -0
  10. data/ext/nutcracker/conf/nutcracker.yml +0 -0
  11. data/ext/nutcracker/config/config.guess +278 -248
  12. data/ext/nutcracker/config/config.sub +234 -77
  13. data/ext/nutcracker/config/depcomp +143 -39
  14. data/ext/nutcracker/config/install-sh +136 -116
  15. data/ext/nutcracker/config/ltmain.sh +1704 -788
  16. data/ext/nutcracker/config/missing +29 -65
  17. data/ext/nutcracker/config.h.in +0 -15
  18. data/ext/nutcracker/configure +1998 -1052
  19. data/ext/nutcracker/configure.ac +2 -34
  20. data/ext/nutcracker/contrib/Makefile.am +0 -0
  21. data/ext/nutcracker/contrib/Makefile.in +120 -47
  22. data/ext/nutcracker/contrib/yaml-0.1.4.tar.gz +0 -0
  23. data/ext/nutcracker/extconf.rb +5 -0
  24. data/ext/nutcracker/m4/libtool.m4 +960 -396
  25. data/ext/nutcracker/m4/ltoptions.m4 +17 -2
  26. data/ext/nutcracker/m4/ltversion.m4 +6 -6
  27. data/ext/nutcracker/notes/c-styleguide.txt +0 -0
  28. data/ext/nutcracker/notes/debug.txt +0 -0
  29. data/ext/nutcracker/notes/memcache.txt +0 -0
  30. data/ext/nutcracker/notes/recommendation.md +0 -0
  31. data/ext/nutcracker/notes/redis.md +0 -0
  32. data/ext/nutcracker/notes/socket.txt +0 -0
  33. data/ext/nutcracker/scripts/nutcracker.init +0 -0
  34. data/ext/nutcracker/scripts/nutcracker.spec +0 -0
  35. data/ext/nutcracker/scripts/redis-check.py +0 -0
  36. data/ext/nutcracker/src/Makefile.am +1 -1
  37. data/ext/nutcracker/src/Makefile.in +167 -81
  38. data/ext/nutcracker/src/hashkit/Makefile.am +0 -0
  39. data/ext/nutcracker/src/hashkit/Makefile.in +72 -37
  40. data/ext/nutcracker/src/hashkit/nc_crc16.c +0 -0
  41. data/ext/nutcracker/src/hashkit/nc_crc32.c +0 -0
  42. data/ext/nutcracker/src/hashkit/nc_fnv.c +0 -0
  43. data/ext/nutcracker/src/hashkit/nc_hashkit.h +0 -0
  44. data/ext/nutcracker/src/hashkit/nc_hsieh.c +0 -0
  45. data/ext/nutcracker/src/hashkit/nc_jenkins.c +0 -0
  46. data/ext/nutcracker/src/hashkit/nc_ketama.c +0 -0
  47. data/ext/nutcracker/src/hashkit/nc_md5.c +0 -0
  48. data/ext/nutcracker/src/hashkit/nc_modula.c +0 -0
  49. data/ext/nutcracker/src/hashkit/nc_murmur.c +0 -0
  50. data/ext/nutcracker/src/hashkit/nc_one_at_a_time.c +0 -0
  51. data/ext/nutcracker/src/hashkit/nc_random.c +0 -0
  52. data/ext/nutcracker/src/nc.c +0 -0
  53. data/ext/nutcracker/src/nc_array.c +0 -0
  54. data/ext/nutcracker/src/nc_array.h +0 -0
  55. data/ext/nutcracker/src/nc_client.c +0 -0
  56. data/ext/nutcracker/src/nc_client.h +0 -0
  57. data/ext/nutcracker/src/nc_conf.c +0 -0
  58. data/ext/nutcracker/src/nc_conf.h +0 -0
  59. data/ext/nutcracker/src/nc_connection.c +0 -0
  60. data/ext/nutcracker/src/nc_connection.h +0 -0
  61. data/ext/nutcracker/src/nc_core.c +26 -29
  62. data/ext/nutcracker/src/nc_core.h +5 -13
  63. data/ext/nutcracker/src/{nc_epoll.c → nc_event.c} +30 -94
  64. data/ext/nutcracker/src/nc_event.h +13 -33
  65. data/ext/nutcracker/src/nc_log.c +0 -0
  66. data/ext/nutcracker/src/nc_log.h +0 -0
  67. data/ext/nutcracker/src/nc_mbuf.c +0 -0
  68. data/ext/nutcracker/src/nc_mbuf.h +0 -0
  69. data/ext/nutcracker/src/nc_message.c +0 -0
  70. data/ext/nutcracker/src/nc_message.h +0 -0
  71. data/ext/nutcracker/src/nc_proxy.c +8 -8
  72. data/ext/nutcracker/src/nc_proxy.h +0 -0
  73. data/ext/nutcracker/src/nc_queue.h +0 -0
  74. data/ext/nutcracker/src/nc_rbtree.c +0 -0
  75. data/ext/nutcracker/src/nc_rbtree.h +0 -0
  76. data/ext/nutcracker/src/nc_request.c +3 -3
  77. data/ext/nutcracker/src/nc_response.c +6 -4
  78. data/ext/nutcracker/src/nc_server.c +5 -5
  79. data/ext/nutcracker/src/nc_server.h +0 -0
  80. data/ext/nutcracker/src/nc_signal.c +0 -0
  81. data/ext/nutcracker/src/nc_signal.h +0 -0
  82. data/ext/nutcracker/src/nc_stats.c +21 -16
  83. data/ext/nutcracker/src/nc_stats.h +4 -3
  84. data/ext/nutcracker/src/nc_string.c +0 -0
  85. data/ext/nutcracker/src/nc_string.h +0 -0
  86. data/ext/nutcracker/src/nc_util.c +0 -16
  87. data/ext/nutcracker/src/nc_util.h +0 -1
  88. data/ext/nutcracker/src/proto/Makefile.am +0 -0
  89. data/ext/nutcracker/src/proto/Makefile.in +72 -37
  90. data/ext/nutcracker/src/proto/nc_memcache.c +0 -0
  91. data/ext/nutcracker/src/proto/nc_proto.h +0 -0
  92. data/ext/nutcracker/src/proto/nc_redis.c +0 -0
  93. data/lib/nutcracker/version.rb +1 -1
  94. metadata +8 -201
  95. data/ext/nutcracker/Makefile +0 -643
  96. data/ext/nutcracker/autom4te.cache/output.0 +0 -18664
  97. data/ext/nutcracker/autom4te.cache/output.1 +0 -18664
  98. data/ext/nutcracker/autom4te.cache/output.2 +0 -18664
  99. data/ext/nutcracker/autom4te.cache/requests +0 -494
  100. data/ext/nutcracker/autom4te.cache/traces.0 +0 -2415
  101. data/ext/nutcracker/autom4te.cache/traces.1 +0 -945
  102. data/ext/nutcracker/autom4te.cache/traces.2 +0 -2415
  103. data/ext/nutcracker/config.h +0 -332
  104. data/ext/nutcracker/config.log +0 -2684
  105. data/ext/nutcracker/config.status +0 -2317
  106. data/ext/nutcracker/contrib/Makefile +0 -494
  107. data/ext/nutcracker/contrib/yaml-0.1.4/Makefile +0 -736
  108. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/output.0 +0 -13102
  109. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/output.1 +0 -13085
  110. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/output.2 +0 -13085
  111. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/requests +0 -476
  112. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/traces.0 +0 -2339
  113. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/traces.1 +0 -545
  114. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/traces.2 +0 -2339
  115. data/ext/nutcracker/contrib/yaml-0.1.4/config.h +0 -81
  116. data/ext/nutcracker/contrib/yaml-0.1.4/config.h.in~ +0 -80
  117. data/ext/nutcracker/contrib/yaml-0.1.4/config.log +0 -688
  118. data/ext/nutcracker/contrib/yaml-0.1.4/config.status +0 -2032
  119. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/annotated.html +0 -51
  120. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/bc_s.png +0 -0
  121. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/classes.html +0 -41
  122. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/closed.png +0 -0
  123. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/doxygen.css +0 -656
  124. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/doxygen.png +0 -0
  125. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/files.html +0 -40
  126. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions.html +0 -91
  127. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x62.html +0 -84
  128. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x63.html +0 -87
  129. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x64.html +0 -83
  130. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x65.html +0 -110
  131. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x66.html +0 -79
  132. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x68.html +0 -80
  133. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x69.html +0 -92
  134. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6b.html +0 -71
  135. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6c.html +0 -88
  136. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6d.html +0 -96
  137. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6e.html +0 -71
  138. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6f.html +0 -80
  139. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x70.html +0 -100
  140. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x71.html +0 -71
  141. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x72.html +0 -87
  142. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x73.html +0 -163
  143. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x74.html +0 -115
  144. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x75.html +0 -71
  145. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x76.html +0 -80
  146. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x77.html +0 -77
  147. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars.html +0 -91
  148. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x62.html +0 -84
  149. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x63.html +0 -87
  150. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x64.html +0 -83
  151. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x65.html +0 -110
  152. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x66.html +0 -79
  153. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x68.html +0 -80
  154. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x69.html +0 -92
  155. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6b.html +0 -71
  156. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6c.html +0 -88
  157. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6d.html +0 -96
  158. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6e.html +0 -71
  159. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6f.html +0 -80
  160. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x70.html +0 -100
  161. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x71.html +0 -71
  162. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x72.html +0 -87
  163. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x73.html +0 -163
  164. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x74.html +0 -115
  165. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x75.html +0 -71
  166. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x76.html +0 -80
  167. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x77.html +0 -77
  168. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals.html +0 -667
  169. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_defs.html +0 -81
  170. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_enum.html +0 -78
  171. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_eval.html +0 -373
  172. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_func.html +0 -196
  173. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_type.html +0 -126
  174. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__basic.html +0 -320
  175. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__emitter.html +0 -819
  176. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__events.html +0 -664
  177. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__export.html +0 -60
  178. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__nodes.html +0 -795
  179. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__parser.html +0 -606
  180. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__styles.html +0 -222
  181. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__tokens.html +0 -246
  182. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__version.html +0 -106
  183. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/index.html +0 -31
  184. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/modules.html +0 -42
  185. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/nav_f.png +0 -0
  186. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/nav_h.png +0 -0
  187. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/open.png +0 -0
  188. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__alias__data__s.html +0 -108
  189. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__document__s.html +0 -235
  190. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__emitter__s.html +0 -1300
  191. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__event__s.html +0 -496
  192. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__mark__s.html +0 -108
  193. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__node__pair__s.html +0 -91
  194. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__node__s.html +0 -420
  195. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__parser__s.html +0 -1229
  196. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__simple__key__s.html +0 -97
  197. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__tag__directive__s.html +0 -91
  198. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__token__s.html +0 -413
  199. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__version__directive__s.html +0 -91
  200. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tab_a.png +0 -0
  201. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tab_b.png +0 -0
  202. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tab_h.png +0 -0
  203. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tab_s.png +0 -0
  204. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tabs.css +0 -59
  205. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/yaml_8h.html +0 -525
  206. data/ext/nutcracker/contrib/yaml-0.1.4/include/Makefile.am +0 -17
  207. data/ext/nutcracker/contrib/yaml-0.1.4/include/Makefile.in +0 -470
  208. data/ext/nutcracker/contrib/yaml-0.1.4/libtool +0 -8890
  209. data/ext/nutcracker/contrib/yaml-0.1.4/src/Makefile +0 -484
  210. data/ext/nutcracker/contrib/yaml-0.1.4/src/api.lo +0 -12
  211. data/ext/nutcracker/contrib/yaml-0.1.4/src/api.o +0 -0
  212. data/ext/nutcracker/contrib/yaml-0.1.4/src/dumper.lo +0 -12
  213. data/ext/nutcracker/contrib/yaml-0.1.4/src/dumper.o +0 -0
  214. data/ext/nutcracker/contrib/yaml-0.1.4/src/emitter.lo +0 -12
  215. data/ext/nutcracker/contrib/yaml-0.1.4/src/emitter.o +0 -0
  216. data/ext/nutcracker/contrib/yaml-0.1.4/src/libyaml.la +0 -41
  217. data/ext/nutcracker/contrib/yaml-0.1.4/src/loader.lo +0 -12
  218. data/ext/nutcracker/contrib/yaml-0.1.4/src/loader.o +0 -0
  219. data/ext/nutcracker/contrib/yaml-0.1.4/src/parser.lo +0 -12
  220. data/ext/nutcracker/contrib/yaml-0.1.4/src/parser.o +0 -0
  221. data/ext/nutcracker/contrib/yaml-0.1.4/src/reader.lo +0 -12
  222. data/ext/nutcracker/contrib/yaml-0.1.4/src/reader.o +0 -0
  223. data/ext/nutcracker/contrib/yaml-0.1.4/src/scanner.lo +0 -12
  224. data/ext/nutcracker/contrib/yaml-0.1.4/src/scanner.o +0 -0
  225. data/ext/nutcracker/contrib/yaml-0.1.4/src/writer.lo +0 -12
  226. data/ext/nutcracker/contrib/yaml-0.1.4/src/writer.o +0 -0
  227. data/ext/nutcracker/contrib/yaml-0.1.4/stamp-h1 +0 -1
  228. data/ext/nutcracker/contrib/yaml-0.1.4/tests/Makefile +0 -675
  229. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor +0 -0
  230. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor-alt +0 -0
  231. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor-alt.o +0 -0
  232. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor.o +0 -0
  233. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter +0 -0
  234. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter-alt +0 -0
  235. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter-alt.o +0 -0
  236. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter.o +0 -0
  237. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-dumper +0 -0
  238. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-dumper.o +0 -0
  239. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-emitter +0 -0
  240. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-emitter.o +0 -0
  241. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-loader +0 -0
  242. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-loader.o +0 -0
  243. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-parser +0 -0
  244. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-parser.o +0 -0
  245. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-scanner +0 -0
  246. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-scanner.o +0 -0
  247. data/ext/nutcracker/contrib/yaml-0.1.4/yaml-0.1.pc +0 -10
  248. data/ext/nutcracker/contrib/yaml-0.1.4/yaml-0.1.pc.in +0 -10
  249. data/ext/nutcracker/libtool +0 -9403
  250. data/ext/nutcracker/src/Makefile +0 -647
  251. data/ext/nutcracker/src/hashkit/Makefile +0 -476
  252. data/ext/nutcracker/src/hashkit/libhashkit.a +0 -0
  253. data/ext/nutcracker/src/hashkit/nc_crc16.o +0 -0
  254. data/ext/nutcracker/src/hashkit/nc_crc32.o +0 -0
  255. data/ext/nutcracker/src/hashkit/nc_fnv.o +0 -0
  256. data/ext/nutcracker/src/hashkit/nc_hsieh.o +0 -0
  257. data/ext/nutcracker/src/hashkit/nc_jenkins.o +0 -0
  258. data/ext/nutcracker/src/hashkit/nc_ketama.o +0 -0
  259. data/ext/nutcracker/src/hashkit/nc_md5.o +0 -0
  260. data/ext/nutcracker/src/hashkit/nc_modula.o +0 -0
  261. data/ext/nutcracker/src/hashkit/nc_murmur.o +0 -0
  262. data/ext/nutcracker/src/hashkit/nc_one_at_a_time.o +0 -0
  263. data/ext/nutcracker/src/hashkit/nc_random.o +0 -0
  264. data/ext/nutcracker/src/nc.o +0 -0
  265. data/ext/nutcracker/src/nc_array.o +0 -0
  266. data/ext/nutcracker/src/nc_client.o +0 -0
  267. data/ext/nutcracker/src/nc_conf.o +0 -0
  268. data/ext/nutcracker/src/nc_connection.o +0 -0
  269. data/ext/nutcracker/src/nc_core.o +0 -0
  270. data/ext/nutcracker/src/nc_epoll.o +0 -0
  271. data/ext/nutcracker/src/nc_kqueue.c +0 -296
  272. data/ext/nutcracker/src/nc_kqueue.o +0 -0
  273. data/ext/nutcracker/src/nc_log.o +0 -0
  274. data/ext/nutcracker/src/nc_mbuf.o +0 -0
  275. data/ext/nutcracker/src/nc_message.o +0 -0
  276. data/ext/nutcracker/src/nc_proxy.o +0 -0
  277. data/ext/nutcracker/src/nc_rbtree.o +0 -0
  278. data/ext/nutcracker/src/nc_request.o +0 -0
  279. data/ext/nutcracker/src/nc_response.o +0 -0
  280. data/ext/nutcracker/src/nc_server.o +0 -0
  281. data/ext/nutcracker/src/nc_signal.o +0 -0
  282. data/ext/nutcracker/src/nc_stats.o +0 -0
  283. data/ext/nutcracker/src/nc_string.o +0 -0
  284. data/ext/nutcracker/src/nc_util.o +0 -0
  285. data/ext/nutcracker/src/nutcracker +0 -0
  286. data/ext/nutcracker/src/proto/Makefile +0 -454
  287. data/ext/nutcracker/src/proto/libproto.a +0 -0
  288. data/ext/nutcracker/src/proto/nc_memcache.o +0 -0
  289. data/ext/nutcracker/src/proto/nc_redis.o +0 -0
  290. data/ext/nutcracker/stamp-h1 +0 -1
@@ -16,86 +16,66 @@
16
16
  */
17
17
 
18
18
  #include <unistd.h>
19
+ #include <sys/epoll.h>
20
+
19
21
  #include <nc_core.h>
20
22
  #include <nc_event.h>
21
23
 
22
- #ifdef NC_HAVE_EPOLL
23
- #include <sys/epoll.h>
24
-
25
- struct evbase *
26
- evbase_create(int nevent, void (*callback_fp)(void *, uint32_t))
24
+ int
25
+ event_init(struct context *ctx, int size)
27
26
  {
28
-
29
- struct evbase *evb;
30
27
  int status, ep;
31
28
  struct epoll_event *event;
32
29
 
33
- if (nevent <= 0) {
34
- log_error("nevent has to be positive %d", nevent);
35
- return NULL;
36
- }
30
+ ASSERT(ctx->ep < 0);
31
+ ASSERT(ctx->nevent != 0);
32
+ ASSERT(ctx->event == NULL);
37
33
 
38
- ep = epoll_create(nevent);
34
+ ep = epoll_create(size);
39
35
  if (ep < 0) {
40
- log_error("epoll create of size %d failed: %s", nevent, strerror(errno));
41
- return NULL;
36
+ log_error("epoll create of size %d failed: %s", size, strerror(errno));
37
+ return -1;
42
38
  }
43
39
 
44
- event = nc_calloc(nevent, sizeof(*event));
40
+ event = nc_calloc(ctx->nevent, sizeof(*ctx->event));
45
41
  if (event == NULL) {
46
42
  status = close(ep);
47
43
  if (status < 0) {
48
44
  log_error("close e %d failed, ignored: %s", ep, strerror(errno));
49
45
  }
50
- return NULL;
51
- }
52
-
53
- evb = nc_alloc(sizeof(*evb));
54
- if (evb == NULL) {
55
- nc_free(event);
56
- status = close(ep);
57
- if (status < 0) {
58
- log_error("close e %d failed, ignored: %s", ep, strerror(errno));
59
- }
60
- return NULL;
61
-
46
+ return -1;
62
47
  }
63
48
 
64
- evb->nevent = nevent;
65
- evb->ep = ep;
66
- evb->event = event;
67
- evb->callback_fp = callback_fp;
49
+ ctx->ep = ep;
50
+ ctx->event = event;
68
51
 
69
- log_debug(LOG_INFO, "e %d with nevent %d", evb->ep,
70
- evb->nevent);
52
+ log_debug(LOG_INFO, "e %d with nevent %d timeout %d", ctx->ep,
53
+ ctx->nevent, ctx->timeout);
71
54
 
72
- return evb;
55
+ return 0;
73
56
  }
74
57
 
75
58
  void
76
- evbase_destroy(struct evbase *evb)
59
+ event_deinit(struct context *ctx)
77
60
  {
78
61
  int status;
79
62
 
80
- if (evb == NULL) return;
63
+ ASSERT(ctx->ep >= 0);
81
64
 
82
- ASSERT(evb->ep >= 0);
65
+ nc_free(ctx->event);
83
66
 
84
- nc_free(evb->event);
85
-
86
- status = close(evb->ep);
67
+ status = close(ctx->ep);
87
68
  if (status < 0) {
88
- log_error("close e %d failed, ignored: %s", evb->ep, strerror(errno));
69
+ log_error("close e %d failed, ignored: %s", ctx->ep, strerror(errno));
89
70
  }
90
- nc_free(evb);
71
+ ctx->ep = -1;
91
72
  }
92
73
 
93
74
  int
94
- event_add_out(struct evbase *evb, struct conn *c)
75
+ event_add_out(int ep, struct conn *c)
95
76
  {
96
77
  int status;
97
78
  struct epoll_event event;
98
- int ep = evb->ep;
99
79
 
100
80
  ASSERT(ep > 0);
101
81
  ASSERT(c != NULL);
@@ -121,11 +101,10 @@ event_add_out(struct evbase *evb, struct conn *c)
121
101
  }
122
102
 
123
103
  int
124
- event_del_out(struct evbase *evb, struct conn *c)
104
+ event_del_out(int ep, struct conn *c)
125
105
  {
126
106
  int status;
127
107
  struct epoll_event event;
128
- int ep = evb->ep;
129
108
 
130
109
  ASSERT(ep > 0);
131
110
  ASSERT(c != NULL);
@@ -151,11 +130,10 @@ event_del_out(struct evbase *evb, struct conn *c)
151
130
  }
152
131
 
153
132
  int
154
- event_add_conn(struct evbase *evb, struct conn *c)
133
+ event_add_conn(int ep, struct conn *c)
155
134
  {
156
135
  int status;
157
136
  struct epoll_event event;
158
- int ep = evb->ep;
159
137
 
160
138
  ASSERT(ep > 0);
161
139
  ASSERT(c != NULL);
@@ -177,10 +155,9 @@ event_add_conn(struct evbase *evb, struct conn *c)
177
155
  }
178
156
 
179
157
  int
180
- event_del_conn(struct evbase *evb, struct conn *c)
158
+ event_del_conn(int ep, struct conn *c)
181
159
  {
182
160
  int status;
183
- int ep = evb->ep;
184
161
 
185
162
  ASSERT(ep > 0);
186
163
  ASSERT(c != NULL);
@@ -199,14 +176,9 @@ event_del_conn(struct evbase *evb, struct conn *c)
199
176
  }
200
177
 
201
178
  int
202
- event_wait(struct evbase *evb, int timeout)
179
+ event_wait(int ep, struct epoll_event *event, int nevent, int timeout)
203
180
  {
204
- int nsd, i;
205
- uint32_t evflags = 0;
206
- int ep = evb->ep;
207
- struct epoll_event *event = evb->event;
208
- int nevent = evb->nevent;
209
- void (*callback_fp)(void *, uint32_t) = evb->callback_fp;
181
+ int nsd;
210
182
 
211
183
  ASSERT(ep > 0);
212
184
  ASSERT(event != NULL);
@@ -215,22 +187,6 @@ event_wait(struct evbase *evb, int timeout)
215
187
  for (;;) {
216
188
  nsd = epoll_wait(ep, event, nevent, timeout);
217
189
  if (nsd > 0) {
218
- for (i = 0; i < nsd; i++) {
219
- struct epoll_event *ev = &evb->event[i];
220
-
221
- evflags = 0;
222
- if (ev->events & EPOLLERR)
223
- evflags |= EV_ERR;
224
-
225
- if (ev->events & EPOLLIN)
226
- evflags |= EV_READ;
227
-
228
- if (ev->events & EPOLLOUT)
229
- evflags |= EV_WRITE;
230
-
231
- if (callback_fp != NULL)
232
- (*callback_fp)((void *) ev->data.ptr, evflags);
233
- }
234
190
  return nsd;
235
191
  }
236
192
 
@@ -253,26 +209,6 @@ event_wait(struct evbase *evb, int timeout)
253
209
 
254
210
  return -1;
255
211
  }
256
- NOT_REACHED();
257
- }
258
212
 
259
- int
260
- event_add_st(struct evbase *evb, int fd)
261
- {
262
- int status;
263
- struct epoll_event ev;
264
-
265
- ev.data.fd = fd;
266
- ev.events = EPOLLIN;
267
-
268
- status = epoll_ctl(evb->ep, EPOLL_CTL_ADD, fd, &ev);
269
- if (status < 0) {
270
- log_error("epoll ctl on e %d sd %d failed: %s", evb->ep, fd,
271
- strerror(errno));
272
- return status;
273
- }
274
-
275
- return status;
213
+ NOT_REACHED();
276
214
  }
277
-
278
- #endif /* NC_HAVE_EPOLL */
@@ -20,40 +20,20 @@
20
20
 
21
21
  #include <nc_core.h>
22
22
 
23
- #define NC_EVENT_SIZE 1024
24
- #define EV_READ 0xff
25
- #define EV_WRITE 0xff00
26
- #define EV_ERR 0xff0000
23
+ /*
24
+ * A hint to the kernel that is used to size the event backing store
25
+ * of a given epoll instance
26
+ */
27
+ #define EVENT_SIZE_HINT 1024
27
28
 
28
- #ifdef NC_HAVE_KQUEUE
29
- struct evbase {
30
- int kq;
31
- struct kevent *changes; /* list of changes to be made */
32
- struct kevent *kevents; /* list of events returned from kevent */
33
- int n_changes; /* number of changes in our list */
34
- int n_returned; /* number of events returned from kevent */
35
- int n_processed;
36
- int nevent;
37
- void (*callback_fp)(void *, uint32_t);
38
- };
39
- #endif
40
- #ifdef NC_HAVE_EPOLL
41
- struct evbase {
42
- int ep;
43
- int nevent;
44
- struct epoll_event *event;
45
- void (*callback_fp)(void *, uint32_t);
46
- };
47
- #endif
29
+ int event_init(struct context *ctx, int size);
30
+ void event_deinit(struct context *ctx);
48
31
 
49
- struct evbase *evbase_create(int size, void (*callback_fp)(void *, uint32_t));
50
- void evbase_destroy(struct evbase *evb);
32
+ int event_add_out(int ep, struct conn *c);
33
+ int event_del_out(int ep, struct conn *c);
34
+ int event_add_conn(int ep, struct conn *c);
35
+ int event_del_conn(int ep, struct conn *c);
51
36
 
52
- int event_add_out(struct evbase *evb, struct conn *c);
53
- int event_del_out(struct evbase *evb, struct conn *c);
54
- int event_add_conn(struct evbase *evb, struct conn *c);
55
- int event_del_conn(struct evbase *evb, struct conn *c);
56
- int event_wait(struct evbase *evb, int timeout);
57
- int event_add_st(struct evbase *evb, int fd);
37
+ int event_wait(int ep, struct epoll_event *event, int nevent, int timeout);
58
38
 
59
- #endif /* _NC_EVENT_H */
39
+ #endif
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -163,18 +163,18 @@ proxy_listen(struct context *ctx, struct conn *p)
163
163
  return NC_ERROR;
164
164
  }
165
165
 
166
- status = event_add_conn(ctx->evb, p);
166
+ status = event_add_conn(ctx->ep, p);
167
167
  if (status < 0) {
168
- log_error("event add conn p %d on addr '%.*s' failed: %s",
169
- p->sd, pool->addrstr.len, pool->addrstr.data,
168
+ log_error("event add conn e %d p %d on addr '%.*s' failed: %s",
169
+ ctx->ep, p->sd, pool->addrstr.len, pool->addrstr.data,
170
170
  strerror(errno));
171
171
  return NC_ERROR;
172
172
  }
173
173
 
174
- status = event_del_out(ctx->evb, p);
174
+ status = event_del_out(ctx->ep, p);
175
175
  if (status < 0) {
176
- log_error("event del out p %d on addr '%.*s' failed: %s",
177
- p->sd, pool->addrstr.len, pool->addrstr.data,
176
+ log_error("event del out e %d p %d on addr '%.*s' failed: %s",
177
+ ctx->ep, p->sd, pool->addrstr.len, pool->addrstr.data,
178
178
  strerror(errno));
179
179
  return NC_ERROR;
180
180
  }
@@ -325,9 +325,9 @@ proxy_accept(struct context *ctx, struct conn *p)
325
325
  }
326
326
  }
327
327
 
328
- status = event_add_conn(ctx->evb, c);
328
+ status = event_add_conn(ctx->ep, c);
329
329
  if (status < 0) {
330
- log_error("event add conn from p %d failed: %s", p->sd,
330
+ log_error("event add conn of c %d from p %d failed: %s", c->sd, p->sd,
331
331
  strerror(errno));
332
332
  c->close(ctx, c);
333
333
  return status;
File without changes
File without changes
File without changes
File without changes
@@ -413,7 +413,7 @@ req_forward_error(struct context *ctx, struct conn *conn, struct msg *msg)
413
413
  }
414
414
 
415
415
  if (req_done(conn, TAILQ_FIRST(&conn->omsg_q))) {
416
- status = event_add_out(ctx->evb, conn);
416
+ status = event_add_out(ctx->ep, conn);
417
417
  if (status != NC_OK) {
418
418
  conn->err = errno;
419
419
  }
@@ -482,7 +482,7 @@ req_forward(struct context *ctx, struct conn *c_conn, struct msg *msg)
482
482
 
483
483
  /* enqueue the message (request) into server inq */
484
484
  if (TAILQ_EMPTY(&s_conn->imsg_q)) {
485
- status = event_add_out(ctx->evb, s_conn);
485
+ status = event_add_out(ctx->ep, s_conn);
486
486
  if (status != NC_OK) {
487
487
  req_forward_error(ctx, c_conn, msg);
488
488
  s_conn->err = errno;
@@ -533,7 +533,7 @@ req_send_next(struct context *ctx, struct conn *conn)
533
533
  nmsg = TAILQ_FIRST(&conn->imsg_q);
534
534
  if (nmsg == NULL) {
535
535
  /* nothing to send as the server inq is empty */
536
- status = event_del_out(ctx->evb, conn);
536
+ status = event_del_out(ctx->ep, conn);
537
537
  if (status != NC_OK) {
538
538
  conn->err = errno;
539
539
  }
@@ -157,9 +157,11 @@ rsp_filter(struct context *ctx, struct conn *conn, struct msg *msg)
157
157
 
158
158
  pmsg = TAILQ_FIRST(&conn->omsg_q);
159
159
  if (pmsg == NULL) {
160
- log_debug(LOG_ERR, "filter stray rsp %"PRIu64" len %"PRIu32" on s %d",
161
- msg->id, msg->mlen, conn->sd);
160
+ log_error("filter stray rsp %"PRIu64" len %"PRIu32" on s %d", msg->id,
161
+ msg->mlen, conn->sd);
162
162
  rsp_put(msg);
163
+ errno = EINVAL;
164
+ conn->err = errno;
163
165
  return true;
164
166
  }
165
167
  ASSERT(pmsg->peer == NULL);
@@ -220,7 +222,7 @@ rsp_forward(struct context *ctx, struct conn *s_conn, struct msg *msg)
220
222
  ASSERT(c_conn->client && !c_conn->proxy);
221
223
 
222
224
  if (req_done(c_conn, TAILQ_FIRST(&c_conn->omsg_q))) {
223
- status = event_add_out(ctx->evb, c_conn);
225
+ status = event_add_out(ctx->ep, c_conn);
224
226
  if (status != NC_OK) {
225
227
  c_conn->err = errno;
226
228
  }
@@ -265,7 +267,7 @@ rsp_send_next(struct context *ctx, struct conn *conn)
265
267
  log_debug(LOG_INFO, "c %d is done", conn->sd);
266
268
  }
267
269
 
268
- status = event_del_out(ctx->evb, conn);
270
+ status = event_del_out(ctx->ep, conn);
269
271
  if (status != NC_OK) {
270
272
  conn->err = errno;
271
273
  }
@@ -367,7 +367,7 @@ server_close(struct context *ctx, struct conn *conn)
367
367
  msg->err = conn->err;
368
368
 
369
369
  if (req_done(c_conn, TAILQ_FIRST(&c_conn->omsg_q))) {
370
- event_add_out(ctx->evb, msg->owner);
370
+ event_add_out(ctx->ep, msg->owner);
371
371
  }
372
372
 
373
373
  log_debug(LOG_INFO, "close s %d schedule error for req %"PRIu64" "
@@ -397,7 +397,7 @@ server_close(struct context *ctx, struct conn *conn)
397
397
  msg->err = conn->err;
398
398
 
399
399
  if (req_done(c_conn, TAILQ_FIRST(&c_conn->omsg_q))) {
400
- event_add_out(ctx->evb, msg->owner);
400
+ event_add_out(ctx->ep, msg->owner);
401
401
  }
402
402
 
403
403
  log_debug(LOG_INFO, "close s %d schedule error for req %"PRIu64" "
@@ -476,10 +476,10 @@ server_connect(struct context *ctx, struct server *server, struct conn *conn)
476
476
  }
477
477
  }
478
478
 
479
- status = event_add_conn(ctx->evb, conn);
479
+ status = event_add_conn(ctx->ep, conn);
480
480
  if (status != NC_OK) {
481
- log_error("event add conn s %d for server '%.*s' failed: %s",
482
- conn->sd, server->pname.len, server->pname.data,
481
+ log_error("event add conn e %d s %d for server '%.*s' failed: %s",
482
+ ctx->ep, conn->sd, server->pname.len, server->pname.data,
483
483
  strerror(errno));
484
484
  goto error;
485
485
  }
File without changes
File without changes
File without changes
@@ -21,11 +21,11 @@
21
21
 
22
22
  #include <sys/types.h>
23
23
  #include <sys/socket.h>
24
+ #include <sys/epoll.h>
24
25
  #include <netinet/in.h>
25
26
 
26
27
  #include <nc_core.h>
27
28
  #include <nc_server.h>
28
- #include <nc_event.h>
29
29
 
30
30
  struct stats_desc {
31
31
  char *name; /* stats name */
@@ -777,7 +777,15 @@ stats_loop(void *arg)
777
777
  int n;
778
778
 
779
779
  for (;;) {
780
- n = event_wait(st->st_evb, st->interval);
780
+ n = epoll_wait(st->ep, &st->event, 1, st->interval);
781
+ if (n < 0) {
782
+ if (errno == EINTR) {
783
+ continue;
784
+ }
785
+ log_error("epoll wait on e %d with event m %d failed: %s",
786
+ st->ep, st->sd, strerror(errno));
787
+ break;
788
+ }
781
789
 
782
790
  /* aggregate stats from shadow (b) -> sum (c) */
783
791
  stats_aggregate(st);
@@ -839,6 +847,7 @@ static rstatus_t
839
847
  stats_start_aggregator(struct stats *st)
840
848
  {
841
849
  rstatus_t status;
850
+ struct epoll_event ev;
842
851
 
843
852
  if (!stats_enabled) {
844
853
  return NC_OK;
@@ -849,28 +858,25 @@ stats_start_aggregator(struct stats *st)
849
858
  return status;
850
859
  }
851
860
 
852
- st->st_evb = evbase_create(1, NULL);
853
- if (st->st_evb == NULL) {
854
- log_error("stats aggregator create failed: %s", strerror(errno));
861
+ st->ep = epoll_create(10);
862
+ if (st->ep < 0) {
863
+ log_error("epoll create failed: %s", strerror(errno));
855
864
  return NC_ERROR;
856
865
  }
857
866
 
858
- ASSERT(st->st_evb != NULL);
859
- ASSERT(st->sd >= 0);
867
+ ev.data.fd = st->sd;
868
+ ev.events = EPOLLIN;
860
869
 
861
- status = event_add_st(st->st_evb, st->sd);
870
+ status = epoll_ctl(st->ep, EPOLL_CTL_ADD, st->sd, &ev);
862
871
  if (status < 0) {
863
- log_error("stats aggregator create failed: %s", strerror(errno));
864
- evbase_destroy(st->st_evb);
865
- st->st_evb = NULL;
872
+ log_error("epoll ctl on e %d sd %d failed: %s", st->ep, st->sd,
873
+ strerror(errno));
866
874
  return NC_ERROR;
867
875
  }
868
876
 
869
877
  status = pthread_create(&st->tid, NULL, stats_loop, st);
870
878
  if (status < 0) {
871
879
  log_error("stats aggregator create failed: %s", strerror(status));
872
- evbase_destroy(st->st_evb);
873
- st->st_evb = NULL;
874
880
  return NC_ERROR;
875
881
  }
876
882
 
@@ -885,8 +891,7 @@ stats_stop_aggregator(struct stats *st)
885
891
  }
886
892
 
887
893
  close(st->sd);
888
- evbase_destroy(st->st_evb);
889
- st->st_evb = NULL;
894
+ close(st->ep);
890
895
  }
891
896
 
892
897
  struct stats *
@@ -916,7 +921,7 @@ stats_create(uint16_t stats_port, char *stats_ip, int stats_interval,
916
921
  array_null(&st->sum);
917
922
 
918
923
  st->tid = (pthread_t) -1;
919
- st->st_evb = NULL;
924
+ st->ep = -1;
920
925
  st->sd = -1;
921
926
 
922
927
  string_set_text(&st->service_str, "service");
@@ -18,8 +18,9 @@
18
18
  #ifndef _NC_STATS_H_
19
19
  #define _NC_STATS_H_
20
20
 
21
+ #include <sys/epoll.h>
22
+
21
23
  #include <nc_core.h>
22
- #include <nc_event.h>
23
24
 
24
25
  #define STATS_POOL_CODEC(ACTION) \
25
26
  /* client behavior */ \
@@ -100,8 +101,8 @@ struct stats {
100
101
 
101
102
  pthread_t tid; /* stats aggregator thread */
102
103
  int sd; /* stats descriptor */
103
-
104
- struct evbase *st_evb;
104
+ int ep; /* epoll device */
105
+ struct epoll_event event; /* epoll event */
105
106
 
106
107
  struct string service_str; /* service string */
107
108
  struct string service; /* service */
File without changes
File without changes
@@ -22,10 +22,7 @@
22
22
  #include <unistd.h>
23
23
  #include <fcntl.h>
24
24
  #include <netdb.h>
25
-
26
- #ifdef NC_HAVE_BACKTRACE
27
25
  #include <execinfo.h>
28
- #endif
29
26
 
30
27
  #include <sys/time.h>
31
28
  #include <sys/types.h>
@@ -278,7 +275,6 @@ _nc_free(void *ptr, const char *name, int line)
278
275
  void
279
276
  nc_stacktrace(int skip_count)
280
277
  {
281
- #ifdef NC_HAVE_BACKTRACE
282
278
  void *stack[64];
283
279
  char **symbols;
284
280
  int size, i, j;
@@ -296,7 +292,6 @@ nc_stacktrace(int skip_count)
296
292
  }
297
293
 
298
294
  free(symbols);
299
- #endif
300
295
  }
301
296
 
302
297
  void
@@ -622,14 +617,3 @@ nc_unresolve_desc(int sd)
622
617
 
623
618
  return nc_unresolve_addr(addr, addrlen);
624
619
  }
625
-
626
- struct timespec
627
- nc_millisec_to_timespec (int n_millisec)
628
- {
629
- struct timeval tv = {n_millisec/1000LL, (n_millisec%1000LL)*1000LL};
630
- struct timespec ts;
631
-
632
- TIMEVAL_TO_TIMESPEC(&tv, &ts);
633
-
634
- return ts;
635
- }
@@ -190,7 +190,6 @@ int _scnprintf(char *buf, size_t size, const char *fmt, ...);
190
190
  int _vscnprintf(char *buf, size_t size, const char *fmt, va_list args);
191
191
  int64_t nc_usec_now(void);
192
192
  int64_t nc_msec_now(void);
193
- struct timespec nc_millisec_to_timespec(int millisec);
194
193
 
195
194
  /*
196
195
  * Address resolution for internet (ipv4 and ipv6) and unix domain
File without changes