more
This commit is contained in:
parent
29e4a61baa
commit
fd9feb1ac5
|
@ -25,10 +25,13 @@
|
|||
POINTER_SHIFT(buf, sizeof(val)); \
|
||||
})
|
||||
|
||||
#define tPutC(buf, val) \
|
||||
({ \
|
||||
((uint64_t *)buf)[0] = (val); \
|
||||
POINTER_SHIFT(buf, sizeof(val)); \
|
||||
#define tPutC(buf, val) \
|
||||
({ \
|
||||
if (buf) { \
|
||||
((uint64_t *)buf)[0] = (val); \
|
||||
POINTER_SHIFT(buf, sizeof(val)); \
|
||||
} \
|
||||
NULL; \
|
||||
})
|
||||
|
||||
#define tPutD(buf, val) \
|
||||
|
@ -41,7 +44,14 @@
|
|||
POINTER_SHIFT(buf, sizeof(val)); \
|
||||
})
|
||||
|
||||
typedef enum { A, B, C, D } T;
|
||||
static inline void tPutE(void **buf, uint64_t val) {
|
||||
if (buf) {
|
||||
((uint64_t *)(*buf))[0] = val;
|
||||
*buf = POINTER_SHIFT(*buf, sizeof(val));
|
||||
}
|
||||
}
|
||||
|
||||
typedef enum { A, B, C, D, E } T;
|
||||
|
||||
static void func(T t) {
|
||||
uint64_t val = 198;
|
||||
|
@ -81,6 +91,14 @@ static void func(T t) {
|
|||
}
|
||||
}
|
||||
break;
|
||||
case E:
|
||||
for (size_t i = 0; i < 10 * 1024l * 1024l * 1024l; i++) {
|
||||
tPutE(&pBuf, val);
|
||||
if (POINTER_DISTANCE(buf, pBuf) == 1024) {
|
||||
pBuf = buf;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
@ -108,5 +126,8 @@ int main(int argc, char const *argv[]) {
|
|||
func(D);
|
||||
uint64_t t5 = now();
|
||||
printf("D: %ld\n", t5 - t4);
|
||||
func(E);
|
||||
uint64_t t6 = now();
|
||||
printf("E: %ld\n", t6 - t5);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -319,12 +319,12 @@ typedef struct SEpSet {
|
|||
} SEpSet;
|
||||
|
||||
typedef struct {
|
||||
int32_t acctId;
|
||||
int64_t clusterId;
|
||||
int32_t connId;
|
||||
int8_t superUser;
|
||||
int8_t reserved[5];
|
||||
SEpSet epSet;
|
||||
int32_t acctId;
|
||||
int64_t clusterId;
|
||||
int32_t connId;
|
||||
int8_t superUser;
|
||||
int8_t reserved[5];
|
||||
SEpSet epSet;
|
||||
} SConnectRsp;
|
||||
|
||||
typedef struct {
|
||||
|
@ -1129,7 +1129,7 @@ typedef struct SVCreateTbReq {
|
|||
} SVCreateTbReq;
|
||||
|
||||
static FORCE_INLINE int tSerializeSVCreateTbReq(void** buf, const SVCreateTbReq* pReq) {
|
||||
int tlen = 0;
|
||||
int tlen = 0;
|
||||
// uint8_t* pBuf = (uint8_t*)(*buf);
|
||||
|
||||
// if (TD_RT_ENDIAN() == TD_LITTLE_ENDIAN) {
|
||||
|
|
|
@ -13,12 +13,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "vnodeDef.h"
|
||||
#include "vnodeQuery.h"
|
||||
#include "vnodeDef.h"
|
||||
|
||||
int vnodeQueryOpen(SVnode *pVnode) {
|
||||
return qWorkerInit(NULL, &pVnode->pQuery);
|
||||
}
|
||||
int vnodeQueryOpen(SVnode *pVnode) { return qWorkerInit(NULL, &pVnode->pQuery); }
|
||||
|
||||
int vnodeProcessQueryReq(SVnode *pVnode, SRpcMsg *pMsg, SRpcMsg **pRsp) {
|
||||
vInfo("query message is processed");
|
||||
|
@ -32,4 +30,8 @@ int vnodeProcessFetchReq(SVnode *pVnode, SRpcMsg *pMsg, SRpcMsg **pRsp) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int vnodeGetTableMeta(SVnode *pVnode, SRpcMsg *pMsg, SRpcMsg **pRsp) {
|
||||
STableInfoMsg *pReq = (STableInfoMsg *)(pMsg->pCont);
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue