亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tcbdb.h

?? 高性能嵌入式數據庫在高并發的環境下使用最好是64位系統比較好
?? H
?? 第 1 頁 / 共 4 頁
字號:
/************************************************************************************************* * The B+ tree database API of Tokyo Cabinet *                                                      Copyright (C) 2006-2008 Mikio Hirabayashi * This file is part of Tokyo Cabinet. * Tokyo Cabinet is free software; you can redistribute it and/or modify it under the terms of * the GNU Lesser General Public License as published by the Free Software Foundation; either * version 2.1 of the License or any later version.  Tokyo Cabinet is distributed in the hope * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public * License for more details. * You should have received a copy of the GNU Lesser General Public License along with Tokyo * Cabinet; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307 USA. *************************************************************************************************/#ifndef _TCBDB_H                         /* duplication check */#define _TCBDB_H#if defined(__cplusplus)#define __TCBDB_CLINKAGEBEGIN extern "C" {#define __TCBDB_CLINKAGEEND }#else#define __TCBDB_CLINKAGEBEGIN#define __TCBDB_CLINKAGEEND#endif__TCBDB_CLINKAGEBEGIN#include <stdlib.h>#include <stdbool.h>#include <stdint.h>#include <time.h>#include <limits.h>#include <math.h>#include <tcutil.h>#include <tchdb.h>/************************************************************************************************* * API *************************************************************************************************//* type of the pointer to a comparison function.   `aptr' specifies the pointer to the region of one key.   `asiz' specifies the size of the region of one key.   `bptr' specifies the pointer to the region of the other key.   `bsiz' specifies the size of the region of the other key.   `op' specifies the pointer to the optional opaque object.   The return value is positive if the former is big, negative if the latter is big, 0 if both   are equivalent. */typedef int (*BDBCMP)(const char *aptr, int asiz, const char *bptr, int bsiz, void *op);/* type of the pointer to a encoding or decoding function.   `ptr' specifies the pointer to the region.   `size' specifies the size of the region.   `sp' specifies the pointer to the variable into which the size of the region of the return   value is assigned.   `op' specifies the pointer to the optional opaque object.   If successful, the return value is the pointer to the result object allocated with `malloc'   call, else, it is `NULL'. */typedef void *(*BDBCODEC)(const void *ptr, int size, int *sp, void *op);typedef struct {                         /* type of structure for a B+ tree database */  void *mmtx;                            /* mutex for method */  void *cmtx;                            /* mutex for cache */  void *tmtx;                            /* mutex for transaction */  TCHDB *hdb;                            /* internal database object */  char *opaque;                          /* opaque buffer */  bool open;                             /* whether the internal database is opened */  bool wmode;                            /* whether to be writable */  uint32_t lmemb;                        /* number of members in each leaf */  uint32_t nmemb;                        /* number of members in each node */  uint8_t opts;                          /* options */  uint64_t root;                         /* ID number of the root page */  uint64_t first;                        /* ID number of the first leaf */  uint64_t last;                         /* ID number of the last leaf */  uint64_t lnum;                         /* number of leaves */  uint64_t nnum;                         /* number of nodes */  uint64_t rnum;                         /* number of records */  TCMAP *leafc;                          /* cache for leaves */  TCMAP *nodec;                          /* cache for nodes */  BDBCMP cmp;                            /* pointer to the comparison function */  void *cmpop;                           /* opaque object for the comparison function */  uint32_t lcnum;                        /* max number of cached leaves */  uint32_t ncnum;                        /* max number of cached nodes */  uint32_t lsmax;                        /* max size of each leaf */  uint32_t lschk;                        /* counter for leaf size checking */  uint64_t capnum;                       /* capacity number of records */  uint64_t *hist;                        /* history array of visited nodes */  int hnum;                              /* number of element of the history array */  uint64_t hleaf;                        /* ID number of the leaf referred by the history */  uint64_t lleaf;                        /* ID number of the last visited leaf */  bool tran;                             /* whether in the transaction */  char *rbopaque;                        /* opaque for rollback */  int64_t cnt_saveleaf;                  /* tesing counter for leaf save times */  int64_t cnt_loadleaf;                  /* tesing counter for leaf load times */  int64_t cnt_killleaf;                  /* tesing counter for leaf kill times */  int64_t cnt_adjleafc;                  /* tesing counter for node cache adjust times */  int64_t cnt_savenode;                  /* tesing counter for node save times */  int64_t cnt_loadnode;                  /* tesing counter for node load times */  int64_t cnt_adjnodec;                  /* tesing counter for node cache adjust times */} TCBDB;enum {                                   /* enumeration for additional flags */  BDBFOPEN = HDBFOPEN,                   /* whether opened */  BDBFFATAL = HDBFFATAL                  /* whetehr with fatal error */};enum {                                   /* enumeration for tuning options */  BDBTLARGE = 1 << 0,                    /* use 64-bit bucket array */  BDBTDEFLATE = 1 << 1,                  /* compress each page with Deflate */  BDBTBZIP = 1 << 2,                     /* compress each record with BZIP2 */  BDBTTCBS = 1 << 3,                     /* compress each page with TCBS */  BDBTEXCODEC = 1 << 4                   /* compress each record with outer functions */};enum {                                   /* enumeration for open modes */  BDBOREADER = 1 << 0,                   /* open as a reader */  BDBOWRITER = 1 << 1,                   /* open as a writer */  BDBOCREAT = 1 << 2,                    /* writer creating */  BDBOTRUNC = 1 << 3,                    /* writer truncating */  BDBONOLCK = 1 << 4,                    /* open without locking */  BDBOLCKNB = 1 << 5                     /* lock without blocking */};typedef struct {                         /* type of structure for a B+ tree cursor */  TCBDB *bdb;                            /* database object */  uint64_t id;                           /* ID number of the leaf */  int32_t kidx;                          /* number of the key */  int32_t vidx;                          /* number of the value */} BDBCUR;enum {                                   /* enumeration for cursor put mode */  BDBCPCURRENT,                          /* current */  BDBCPBEFORE,                           /* before */  BDBCPAFTER                             /* after */};/* Get the message string corresponding to an error code.   `ecode' specifies the error code.   The return value is the message string of the error code. */const char *tcbdberrmsg(int ecode);/* Create a B+ tree database object.   The return value is the new B+ tree database object. */TCBDB *tcbdbnew(void);/* Delete a B+ tree database object.   `bdb' specifies the B+ tree database object.   If the database is not closed, it is closed implicitly.  Note that the deleted object and its   derivatives can not be used anymore. */void tcbdbdel(TCBDB *bdb);/* Get the last happened error code of a B+ tree database object.   `bdb' specifies the B+ tree database object.   The return value is the last happened error code.   The following error codes are defined: `TCESUCCESS' for success, `TCETHREAD' for threading   error, `TCEINVALID' for invalid operation, `TCENOFILE' for file not found, `TCENOPERM' for no   permission, `TCEMETA' for invalid meta data, `TCERHEAD' for invalid record header, `TCEOPEN'   for open error, `TCECLOSE' for close error, `TCETRUNC' for trunc error, `TCESYNC' for sync   error, `TCESTAT' for stat error, `TCESEEK' for seek error, `TCEREAD' for read error,   `TCEWRITE' for write error, `TCEMMAP' for mmap error, `TCELOCK' for lock error, `TCEUNLINK'   for unlink error, `TCERENAME' for rename error, `TCEMKDIR' for mkdir error, `TCERMDIR' for   rmdir error, `TCEKEEP' for existing record, `TCENOREC' for no record found, and `TCEMISC' for   miscellaneous error. */int tcbdbecode(TCBDB *bdb);/* Set mutual exclusion control of a B+ tree database object for threading.   `bdb' specifies the B+ tree database object which is not opened.   If successful, the return value is true, else, it is false.   Note that the mutual exclusion control is needed if the object is shared by plural threads and   this function should should be called before the database is opened. */bool tcbdbsetmutex(TCBDB *bdb);/* Set the custom comparison function of a B+ tree database object.   `bdb' specifies the B+ tree database object which is not opened.   `cmp' specifies the pointer to the custom comparison function.   `cmpop' specifies an arbitrary pointer to be given as a parameter of the comparison function.   If it is not needed, `NULL' can be specified.   If successful, the return value is true, else, it is false.   The default comparison function compares keys of two records by lexical order.  The functions   `tcbdbcmplexical' (dafault), `tcbdbcmpdecimal', `tcbdbcmpint32', and `tcbdbcmpint64' are   built-in.  Note that the comparison function should be set before the database is opened.   Moreover, user-defined comparison functions should be set every time the database is being   opened. */bool tcbdbsetcmpfunc(TCBDB *bdb, BDBCMP cmp, void *cmpop);/* Set the tuning parameters of a B+ tree database object.   `bdb' specifies the B+ tree database object which is not opened.   `lmemb' specifies the number of members in each leaf page.  If it is not more than 0, the   default value is specified.  The default value is 128.   `nmemb' specifies the number of members in each non-leaf page.  If it is not more than 0, the   default value is specified.  The default value is 256.   `bnum' specifies the number of elements of the bucket array.  If it is not more than 0, the   default value is specified.  The default value is 32749.  Suggested size of the bucket array   is about from 1 to 4 times of the number of all pages to be stored.   `apow' specifies the size of record alignment by power of 2.  If it is negative, the default   value is specified.  The default value is 8 standing for 2^8=256.   `fpow' specifies the maximum number of elements of the free block pool by power of 2.  If it   is negative, the default value is specified.  The default value is 10 standing for 2^10=1024.   `opts' specifies options by bitwise or: `BDBTLARGE' specifies that the size of the database   can be larger than 2GB by using 64-bit bucket array, `BDBTDEFLATE' specifies that each page   is compressed with Deflate encoding, `BDBTBZIP' specifies that each page is compressed with   BZIP2 encoding, `BDBTTCBS' specifies that each page is compressed with TCBS encoding.   If successful, the return value is true, else, it is false.   Note that the tuning parameters should be set before the database is opened. */bool tcbdbtune(TCBDB *bdb, int32_t lmemb, int32_t nmemb,               int64_t bnum, int8_t apow, int8_t fpow, uint8_t opts);/* Set the caching parameters of a B+ tree database object.   `bdb' specifies the B+ tree database object which is not opened.   `lcnum' specifies the maximum number of leaf nodes to be cached.  If it is not more than 0,   the default value is specified.  The default value is 1024.   `ncnum' specifies the maximum number of non-leaf nodes to be cached.  If it is not more than 0,   the default value is specified.  The default value is 512.   If successful, the return value is true, else, it is false.   Note that the caching parameters should be set before the database is opened. */bool tcbdbsetcache(TCBDB *bdb, int32_t lcnum, int32_t ncnum);/* Set the size of the extra mapped memory of a B+ tree database object.   `bdb' specifies the B+ tree database object which is not opened.   `xmsiz' specifies the size of the extra mapped memory.  If it is not more than 0, the extra   mapped memory is disabled.  It is disabled by default.   If successful, the return value is true, else, it is false.   Note that the mapping parameters should be set before the database is opened. */bool tcbdbsetxmsiz(TCBDB *bdb, int64_t xmsiz);/* Open a database file and connect a B+ tree database object.   `bdb' specifies the B+ tree database object which is not opened.   `path' specifies the path of the database file.   `omode' specifies the connection mode: `BDBOWRITER' as a writer, `BDBOREADER' as a reader.   If the mode is `BDBOWRITER', the following may be added by bitwise or: `BDBOCREAT', which   means it creates a new database if not exist, `BDBOTRUNC', which means it creates a new database   regardless if one exists.  Both of `BDBOREADER' and `BDBOWRITER' can be added to by   bitwise or: `BDBONOLCK', which means it opens the database file without file locking, or   `BDBOLCKNB', which means locking is performed without blocking.   If successful, the return value is true, else, it is false. */bool tcbdbopen(TCBDB *bdb, const char *path, int omode);/* Close a B+ tree database object.   `bdb' specifies the B+ tree database object.   If successful, the return value is true, else, it is false.   Update of a database is assured to be written when the database is closed.  If a writer opens   a database but does not close it appropriately, the database will be broken. */bool tcbdbclose(TCBDB *bdb);/* Store a record into a B+ tree database object.   `bdb' specifies the B+ tree database object connected as a writer.   `kbuf' specifies the pointer to the region of the key.   `ksiz' specifies the size of the region of the key.   `vbuf' specifies the pointer to the region of the value.   `vsiz' specifies the size of the region of the value.   If successful, the return value is true, else, it is false.   If a record with the same key exists in the database, it is overwritten. */bool tcbdbput(TCBDB *bdb, const void *kbuf, int ksiz, const void *vbuf, int vsiz);/* Store a string record into a B+ tree database object.   `bdb' specifies the B+ tree database object connected as a writer.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜视频在线观看一区二区三区| 成人自拍视频在线| 欧美裸体bbwbbwbbw| 18成人在线观看| 99久久精品免费看| 亚洲欧洲性图库| 色婷婷av一区二区三区gif| 亚洲自拍另类综合| 欧美一区二区三区在线视频 | 日韩美女视频一区二区在线观看| 蜜臀av性久久久久蜜臀aⅴ四虎| 欧美群妇大交群中文字幕| 免费黄网站欧美| 亚洲国产岛国毛片在线| 91免费观看在线| 日本亚洲电影天堂| 中文一区二区在线观看| 色88888久久久久久影院野外| 日韩成人伦理电影在线观看| 中文字幕精品在线不卡| 国产欧美日韩视频在线观看| 国产日韩精品一区二区浪潮av | 成人精品视频一区二区三区尤物| 一级精品视频在线观看宜春院| 精品剧情在线观看| 欧美午夜一区二区三区| 成人性生交大片免费看在线播放| 亚洲在线观看免费| 国产精品久久久久久久久快鸭 | 国产一区二区三区免费在线观看| 亚洲精品亚洲人成人网在线播放| 日韩一区二区免费在线电影| 91丨porny丨蝌蚪视频| 激情亚洲综合在线| 亚洲一区二区三区三| 中文字幕亚洲一区二区av在线 | 国产一区二区女| 日日嗨av一区二区三区四区| 日韩一区在线免费观看| 国产亚洲一区二区三区四区| 精品国产91洋老外米糕| 欧美一卡二卡在线观看| 欧美三区免费完整视频在线观看| 99国产欧美另类久久久精品| 99久久er热在这里只有精品15| 成人夜色视频网站在线观看| 丰满少妇久久久久久久| 国产激情视频一区二区在线观看| 久久精品99国产精品日本| 麻豆国产精品777777在线| 美女爽到高潮91| 久久国产麻豆精品| 丰满岳乱妇一区二区三区| 99久久婷婷国产精品综合| 91蜜桃传媒精品久久久一区二区 | 视频一区国产视频| va亚洲va日韩不卡在线观看| av在线不卡网| 欧美视频一区在线| 欧美一级淫片007| 欧美va天堂va视频va在线| 国产欧美视频一区二区| 亚洲精品久久7777| 日日夜夜精品视频免费| 国产成人啪免费观看软件| 欧洲中文字幕精品| 精品福利视频一区二区三区| 中文在线一区二区| 日韩国产在线一| av不卡免费在线观看| 日韩欧美精品三级| 成人欧美一区二区三区| 美女脱光内衣内裤视频久久网站| 成人免费毛片片v| 欧美mv日韩mv亚洲| 中文字幕日韩一区| 极品少妇一区二区| 欧美精品在线一区二区三区| 国产精品三级电影| 国产成人午夜视频| 欧美一级一级性生活免费录像| 日韩伦理av电影| 成人中文字幕在线| 久久一日本道色综合| 日韩**一区毛片| 欧美精品一卡二卡| 一区二区三区在线视频播放| 99re免费视频精品全部| 国产精品丝袜一区| 粉嫩在线一区二区三区视频| 久久久无码精品亚洲日韩按摩| 麻豆精品在线播放| 欧美一区二区三区视频在线 | 久久久99精品免费观看不卡| 国产中文一区二区三区| 久久午夜国产精品| 国产高清无密码一区二区三区| 26uuu国产日韩综合| 国产精一区二区三区| 国产精品久久久久久久久快鸭 | 久久综合色综合88| 国产精品一区二区三区网站| 中文字幕va一区二区三区| eeuss影院一区二区三区| 亚洲四区在线观看| 欧美精品色一区二区三区| 精品一区二区三区免费毛片爱| 精品精品国产高清一毛片一天堂| 极品销魂美女一区二区三区| 国产精品丝袜久久久久久app| 在线亚洲精品福利网址导航| 亚洲一区二区三区自拍| 日韩一级黄色大片| 国产精品一区二区x88av| 国产精品久久国产精麻豆99网站| 欧美精品一区二区三区视频| 激情av综合网| 中文字幕精品综合| 日韩欧美电影一区| 粉嫩av亚洲一区二区图片| 亚洲国产精品久久久久婷婷884 | 欧洲色大大久久| 国产在线视视频有精品| 亚洲h动漫在线| 久久伊99综合婷婷久久伊| 欧美午夜精品理论片a级按摩| 狠狠狠色丁香婷婷综合激情| 一区二区成人在线| 亚洲国产精品av| 精品少妇一区二区三区在线播放 | 午夜精品免费在线| 欧美精品一区二区久久久| 日本道色综合久久| 99精品在线观看视频| 国产成人精品亚洲777人妖| 青草国产精品久久久久久| 亚洲在线观看免费| 亚洲乱码国产乱码精品精的特点| 国产欧美一区二区精品久导航 | 久久久久久久久蜜桃| 欧美一区二区播放| 欧美性大战久久久久久久蜜臀| 99久久久免费精品国产一区二区| 国产成人在线观看| 国产麻豆欧美日韩一区| 国产夫妻精品视频| 高清视频一区二区| 不卡视频免费播放| 国产精品1区2区3区在线观看| 极品尤物av久久免费看| 亚洲大片精品永久免费| 国产片一区二区三区| 亚瑟在线精品视频| 懂色av中文字幕一区二区三区| 久久国产精品第一页| 激情国产一区二区| 成人性视频网站| 欧美日韩一区中文字幕| 欧美成人女星排名| 国产精品久久久久久福利一牛影视| 中文字幕在线免费不卡| 亚洲va欧美va天堂v国产综合| 精品综合免费视频观看| 一本大道av伊人久久综合| 国产亚洲欧美在线| 久久综合综合久久综合| 欧美日韩一区二区三区不卡| 国产日本欧美一区二区| 青青青伊人色综合久久| 不卡一区二区在线| 国产女同互慰高潮91漫画| 亚洲成人av资源| 老司机免费视频一区二区 | 日韩欧美一级二级三级| 1000精品久久久久久久久| 国产精品久久一卡二卡| 一区二区日韩电影| 欧美专区在线观看一区| 天堂午夜影视日韩欧美一区二区| 国产a视频精品免费观看| 久久久精品天堂| 国内成人精品2018免费看| 26uuu成人网一区二区三区| 日产国产高清一区二区三区| 欧美夫妻性生活| 日韩国产一区二| 91国内精品野花午夜精品| 国产精品久久午夜| 色先锋aa成人| 亚洲小少妇裸体bbw| 日韩欧美一区二区不卡| 蜜桃视频一区二区三区| 日本一区二区免费在线| 91福利精品第一导航| 日本美女一区二区| 欧美大片在线观看| 美女高潮久久久| 亚洲欧洲成人自拍| 91福利视频网站| 精彩视频一区二区|