资源简介
redis-2.6.13.tar.gz
代码片段和文件信息
/*
* Copyright (c) 2009-2011 Salvatore Sanfilippo
* Copyright (c) 2010-2011 Pieter Noordhuis
*
* 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.
*/
#include “fmacros.h“
#include
#include
#include
#include
#include
#include
#include “async.h“
#include “net.h“
#include “dict.c“
#include “sds.h“
#define _EL_ADD_READ(ctx) do { \
if ((ctx)->ev.addRead) (ctx)->ev.addRead((ctx)->ev.data); \
} while(0)
#define _EL_DEL_READ(ctx) do { \
if ((ctx)->ev.delRead) (ctx)->ev.delRead((ctx)->ev.data); \
} while(0)
#define _EL_ADD_WRITE(ctx) do { \
if ((ctx)->ev.addWrite) (ctx)->ev.addWrite((ctx)->ev.data); \
} while(0)
#define _EL_DEL_WRITE(ctx) do { \
if ((ctx)->ev.delWrite) (ctx)->ev.delWrite((ctx)->ev.data); \
} while(0)
#define _EL_CLEANUP(ctx) do { \
if ((ctx)->ev.cleanup) (ctx)->ev.cleanup((ctx)->ev.data); \
} while(0);
/* Forward declaration of function in hiredis.c */
void __redisAppendCommand(redisContext *c char *cmd size_t len);
/* Functions managing dictionary of callbacks for pub/sub. */
static unsigned int callbackHash(const void *key) {
return dictGenHashFunction((unsigned char*)keysdslen((char*)key));
}
static void *callbackValDup(void *privdata const void *src) {
((void) privdata);
redisCallback *dup = malloc(sizeof(*dup));
memcpy(dupsrcsizeof(*dup));
return dup;
}
static int callba
- 上一篇:模拟磁盘文件系统实现
- 下一篇:基于STM32的云台控制-技术论文
相关资源
- Redis+Spring缓存windows环境,附及详解
- Redis命令中文文档CHM
- redis手册.zip
- redis-3.0.0.gem
- vue+springboot前后端分离项目源码
- redis消息大小对性能的影响
- SpringBoot+redis+RabbitMq整合
- ServiceStack.Redis.4.0.60破解版
- ServiceStack.Redis5.2.0 最新版去除6000次限
- dubbo全套视频教程(含有文档、ppt、源
- linuxredis实战教程视频.txt
- 基于SpringBoot 2.0.3.RELEASE+Mybatis+Redis的
- ServiceStack.Redis 4.0.52 破解版
- Windows-redis
- Redis的Windows版本2.6.12,包括32位和64位
- StackExchange.Redis .NET4.0
- Redis3.2--64位
- dubbo 分布式全套教学视频A
- Redis视频教程及源码课件
- opc-core-components-redistributables-3.00.107-
- OPC Core Components 2.00 Redistributable 2.20.
- Floral organogenesis in Urophysa rockii a redi
- 安装 Microsoft Visual Studio 2013 Redistribu
- spring整合redis
- Redis学习视频资源
- Redis的Windows版本2.6.12,包括32位和64位
- redis 3.0.5 windows x64 版本
- Redis深度历险:核心原理和应用实践
- redis-3.0.0
- ServiceStack.Redis.3.9.29.0
评论
共有 条评论