type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
functions | int
libxlMigrationEatCookie(const char *cookiein,
int cookieinlen,
libxlMigrationCookiePtr *migout)
{
libxlMigrationCookiePtr mig = NULL;
xmlDocPtr doc = NULL;
xmlXPathContextPtr ctxt = NULL;
char *uuidstr = NULL;
int ret = -1;
/*
* Assume a ... |
functions | void
libxlMigrationDstArgsDispose(void *obj)
{
libxlMigrationDstArgs *args = obj;
libxlMigrationCookieFree(args->migcookie);
VIR_FREE(args->socks);
virObjectUnref(args->conn);
virObjectUnref(args->vm);
} |
functions | int
libxlMigrationDstArgsOnceInit(void)
{
if (!VIR_CLASS_NEW(libxlMigrationDstArgs, virClassForObject()))
return -1;
return 0;
} |
functions | void
libxlDoMigrateDstReceive(void *opaque)
{
libxlMigrationDstArgs *args = opaque;
virDomainObjPtr vm = args->vm;
virNetSocketPtr *socks = args->socks;
size_t nsocks = args->nsocks;
libxlDriverPrivatePtr driver = args->conn->privateData;
int recvfd = args->recvfd;
size_t i;
virObjectRe... |
functions | void
libxlMigrateDstReceive(virNetSocketPtr sock,
int events ATTRIBUTE_UNUSED,
void *opaque)
{
libxlMigrationDstArgs *args = opaque;
virNetSocketPtr *socks = args->socks;
size_t nsocks = args->nsocks;
libxlDomainObjPrivatePtr priv = args->vm->privateData;
... |
functions | int
libxlDoMigrateSrcSend(libxlDriverPrivatePtr driver,
virDomainObjPtr vm,
unsigned long flags,
int sockfd)
{
libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver);
int xl_flags = 0;
int ret;
if (flags & VIR_MIGRATE_LIVE)
xl_f... |
functions | bool
libxlDomainMigrationIsAllowed(virDomainDefPtr def)
{
/* Migration is not allowed if definition contains any hostdevs */
if (def->nhostdevs > 0) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("domain has assigned host devices"));
return false;
} |
functions | virDomainDefPtr
libxlDomainMigrationDstPrepareDef(libxlDriverPrivatePtr driver,
const char *dom_xml,
const char *dname)
{
libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver);
virDomainDefPtr def;
char *name = NULL;
if (!dom_xml) {
... |
functions | int
libxlDomainMigrationPrepareAny(virConnectPtr dconn,
virDomainDefPtr *def,
const char *cookiein,
int cookieinlen,
libxlMigrationCookiePtr *mig,
char **xmlout,
... |
functions | else if (hookret == 0) {
if (virStringIsEmpty(*xmlout)) {
VIR_DEBUG("Migrate hook filter returned nothing; using the"
" original XML");
} |
functions | int
libxlDomainMigrationDstPrepareTunnel3(virConnectPtr dconn,
virStreamPtr st,
virDomainDefPtr *def,
const char *cookiein,
int cookieinlen,
... |
functions | int
libxlDomainMigrationDstPrepare(virConnectPtr dconn,
virDomainDefPtr *def,
const char *uri_in,
char **uri_out,
const char *cookiein,
int cookieinlen,
... |
functions | void libxlTunnel3MigrationSrcFunc(void *arg)
{
libxlTunnelMigrationThread *data = (libxlTunnelMigrationThread *)arg;
char *buffer = NULL;
struct pollfd fds[1];
int timeout = -1;
if (VIR_ALLOC_N(buffer, TUNNEL_SEND_BUF_SIZE) < 0)
return;
fds[0].fd = data->srcFD;
for (;;) {
i... |
functions | else if (nbytes < 0) {
virReportError(errno, "%s",
_("tunnelled migration failed to read from xen side"));
virStreamAbort(data->st);
goto cleanup;
} |
functions | int
libxlMigrationSrcStartTunnel(libxlDriverPrivatePtr driver,
virDomainObjPtr vm,
unsigned long flags,
virStreamPtr st,
struct libxlTunnelControl **tnl)
{
struct libxlTunnelControl *tc = NULL;
li... |
functions | void libxlMigrationSrcStopTunnel(struct libxlTunnelControl *tc)
{
if (!tc)
return;
virThreadCancel(&tc->thread);
virThreadJoin(&tc->thread);
VIR_FORCE_CLOSE(tc->dataFD[0]);
VIR_FORCE_CLOSE(tc->dataFD[1]);
VIR_FREE(tc);
} |
functions | int
libxlDoMigrateSrcP2P(libxlDriverPrivatePtr driver,
virDomainObjPtr vm,
virConnectPtr sconn,
const char *xmlin,
virConnectPtr dconn,
const char *dconnuri ATTRIBUTE_UNUSED,
const char *dname,
... |
functions | int
libxlDomainMigrationSrcPerformP2P(libxlDriverPrivatePtr driver,
virDomainObjPtr vm,
virConnectPtr sconn,
const char *xmlin,
const char *dconnuri,
... |
functions | int
libxlDomainMigrationSrcPerform(libxlDriverPrivatePtr driver,
virDomainObjPtr vm,
const char *dom_xml ATTRIBUTE_UNUSED,
const char *dconnuri ATTRIBUTE_UNUSED,
const char *uri_str,
... |
functions | virDomainPtr
libxlDomainMigrationDstFinish(virConnectPtr dconn,
virDomainObjPtr vm,
unsigned int flags,
int cancelled)
{
libxlDriverPrivatePtr driver = dconn->privateData;
libxlDriverConfigPtr cfg = libxlDriverConfigGet(dr... |
functions | int
libxlDomainMigrationSrcConfirm(libxlDriverPrivatePtr driver,
virDomainObjPtr vm,
unsigned int flags,
int cancelled)
{
libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver);
libxlDomainObjPrivatePtr priv = vm->priv... |
functions | else if (status == HTTP_STATUS_UPGRADE_REQUIRED)
{
/* Flush any error message... */
httpFlush(http);
/* Reconnect... */
if (httpReconnect2(http, 30000, NULL))
{
status = HTTP_STATUS_ERROR;
break;
} |
functions | else if (status == HTTP_STATUS_UPGRADE_REQUIRED)
{
/* Flush any error message... */
httpFlush(http);
/* Reconnect... */
if (httpReconnect2(http, 30000, NULL))
{
status = HTTP_STATUS_ERROR;
break;
} |
defines |
#define TDBOPAQUESIZ 64 // size of using opaque field |
defines | #define TDBLEFTOPQSIZ 64 // size of left opaque field |
defines | #define TDBPAGEBUFSIZ 32768 // size of a buffer to read each page |
defines |
#define TDBDEFBNUM 131071 // default bucket number |
defines | #define TDBDEFAPOW 4 // default alignment power |
defines | #define TDBDEFFPOW 10 // default free block pool power |
defines | #define TDBDEFLCNUM 4096 // default number of leaf cache |
defines | #define TDBDEFNCNUM 512 // default number of node cache |
defines | #define TDBDEFXMSIZ (64LL<<20) // default size of the extra mapped memory |
defines | #define TDBIDXSUFFIX "idx" // suffix of column index file |
defines | #define TDBIDXLMEMB 64 // number of members in each leaf of the index |
defines | #define TDBIDXNMEMB 256 // number of members in each node of the index |
defines | #define TDBIDXLSMAX 4096 // maximum size of each leaf of the index |
defines | #define TDBIDXICCBNUM 262139 // bucket number of the index cache |
defines | #define TDBIDXICCMAX (64LL<<20) // maximum size of the index cache |
defines | #define TDBIDXICCSYNC 0.01 // ratio of cache synchronization |
defines | #define TDBIDXQGUNIT 3 // unit number of the q-gram index |
defines | #define TDBFTSUNITMAX 32 // maximum number of full-text search units |
defines | #define TDBFTSOCRUNIT 8192 // maximum number of full-text search units |
defines | #define TDBFTSBMNUM 524287 // number of elements of full-text search bitmap |
defines | #define TDBNUMCNTCOL "_num" // column name of number counting |
defines | #define TDBCOLBUFSIZ 1024 // size of a buffer for a column value |
defines | #define TDBNUMCOLMAX 16 // maximum number of columns of the long double |
defines | #define TDBHINTUSIZ 256 // unit size of the hint string |
defines | #define TDBORDRATIO 0.2 // ratio of records to use the order index |
defines | #define TDBLOCKMETHOD(TC_tdb, TC_wr) \ |
defines | #define TDBUNLOCKMETHOD(TC_tdb) \ |
defines | #define TDBTHREADYIELD(TC_tdb) \ |
functions | void tctdbdel(TCTDB *tdb){
assert(tdb);
if(tdb->open) tctdbclose(tdb);
tchdbdel(tdb->hdb);
if(tdb->mmtx){
pthread_rwlock_destroy(tdb->mmtx);
TCFREE(tdb->mmtx);
} |
functions | int tctdbecode(TCTDB *tdb){
assert(tdb);
return tchdbecode(tdb->hdb);
} |
functions | bool tctdbsetmutex(TCTDB *tdb){
assert(tdb);
if(!TCUSEPTHREAD) return true;
if(tdb->mmtx || tdb->open){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
return false;
} |
functions | bool tctdbtune(TCTDB *tdb, int64_t bnum, int8_t apow, int8_t fpow, uint8_t opts){
assert(tdb);
if(tdb->open){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
return false;
} |
functions | bool tctdbsetcache(TCTDB *tdb, int32_t rcnum, int32_t lcnum, int32_t ncnum){
assert(tdb);
if(tdb->open){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
return false;
} |
functions | bool tctdbsetxmsiz(TCTDB *tdb, int64_t xmsiz){
assert(tdb);
if(tdb->open){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
return false;
} |
functions | bool tctdbsetdfunit(TCTDB *tdb, int32_t dfunit){
assert(tdb);
if(tdb->open){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
return false;
} |
functions | bool tctdbopen(TCTDB *tdb, const char *path, int omode){
assert(tdb && path);
if(!TDBLOCKMETHOD(tdb, true)) return false;
if(tdb->open){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
TDBUNLOCKMETHOD(tdb);
return false;
} |
functions | bool tctdbclose(TCTDB *tdb){
assert(tdb);
if(!TDBLOCKMETHOD(tdb, true)) return false;
if(!tdb->open){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
TDBUNLOCKMETHOD(tdb);
return false;
} |
functions | bool tctdbput(TCTDB *tdb, const void *pkbuf, int pksiz, TCMAP *cols){
assert(tdb && pkbuf && pksiz >= 0 && cols);
int vsiz;
if(tcmapget(cols, "", 0, &vsiz)){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
return false;
} |
functions | bool tctdbput2(TCTDB *tdb, const void *pkbuf, int pksiz, const void *cbuf, int csiz){
assert(tdb && pkbuf && pksiz >= 0 && cbuf && csiz >= 0);
TCMAP *cols = tcstrsplit4(cbuf, csiz);
bool rv = tctdbput(tdb, pkbuf, pksiz, cols);
tcmapdel(cols);
return rv;
} |
functions | bool tctdbput3(TCTDB *tdb, const char *pkstr, const char *cstr){
assert(tdb && pkstr && cstr);
TCMAP *cols = tcstrsplit3(cstr, "\t");
bool rv = tctdbput(tdb, pkstr, strlen(pkstr), cols);
tcmapdel(cols);
return rv;
} |
functions | bool tctdbputkeep(TCTDB *tdb, const void *pkbuf, int pksiz, TCMAP *cols){
assert(tdb && pkbuf && pksiz >= 0 && cols);
int vsiz;
if(tcmapget(cols, "", 0, &vsiz)){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
return false;
} |
functions | bool tctdbputkeep2(TCTDB *tdb, const void *pkbuf, int pksiz, const void *cbuf, int csiz){
assert(tdb && pkbuf && pksiz >= 0 && cbuf && csiz >= 0);
TCMAP *cols = tcstrsplit4(cbuf, csiz);
bool rv = tctdbputkeep(tdb, pkbuf, pksiz, cols);
tcmapdel(cols);
return rv;
} |
functions | bool tctdbputkeep3(TCTDB *tdb, const char *pkstr, const char *cstr){
assert(tdb && pkstr && cstr);
TCMAP *cols = tcstrsplit3(cstr, "\t");
bool rv = tctdbputkeep(tdb, pkstr, strlen(pkstr), cols);
tcmapdel(cols);
return rv;
} |
functions | bool tctdbputcat(TCTDB *tdb, const void *pkbuf, int pksiz, TCMAP *cols){
assert(tdb && pkbuf && pksiz >= 0 && cols);
int vsiz;
if(tcmapget(cols, "", 0, &vsiz)){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
return false;
} |
functions | bool tctdbputcat2(TCTDB *tdb, const void *pkbuf, int pksiz, const void *cbuf, int csiz){
assert(tdb && pkbuf && pksiz >= 0 && cbuf && csiz >= 0);
TCMAP *cols = tcstrsplit4(cbuf, csiz);
bool rv = tctdbputcat(tdb, pkbuf, pksiz, cols);
tcmapdel(cols);
return rv;
} |
functions | bool tctdbputcat3(TCTDB *tdb, const char *pkstr, const char *cstr){
assert(tdb && pkstr && cstr);
TCMAP *cols = tcstrsplit3(cstr, "\t");
bool rv = tctdbputcat(tdb, pkstr, strlen(pkstr), cols);
tcmapdel(cols);
return rv;
} |
functions | bool tctdbout(TCTDB *tdb, const void *pkbuf, int pksiz){
assert(tdb && pkbuf && pksiz >= 0);
if(!TDBLOCKMETHOD(tdb, true)) return false;
if(!tdb->open || !tdb->wmode){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
TDBUNLOCKMETHOD(tdb);
return false;
} |
functions | bool tctdbout2(TCTDB *tdb, const char *pkstr){
assert(tdb && pkstr);
return tctdbout(tdb, pkstr, strlen(pkstr));
} |
functions | int tctdbvsiz(TCTDB *tdb, const void *pkbuf, int pksiz){
assert(tdb && pkbuf && pksiz >= 0);
if(!TDBLOCKMETHOD(tdb, false)) return -1;
if(!tdb->open){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
TDBUNLOCKMETHOD(tdb);
return -1;
} |
functions | int tctdbvsiz2(TCTDB *tdb, const char *pkstr){
assert(tdb && pkstr);
return tctdbvsiz(tdb, pkstr, strlen(pkstr));
} |
functions | bool tctdbiterinit(TCTDB *tdb){
assert(tdb);
if(!TDBLOCKMETHOD(tdb, true)) return false;
if(!tdb->open){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
TDBUNLOCKMETHOD(tdb);
return false;
} |
functions | int tctdbaddint(TCTDB *tdb, const void *pkbuf, int pksiz, int num){
assert(tdb && pkbuf && pksiz >= 0);
if(!TDBLOCKMETHOD(tdb, true)) return INT_MIN;
if(!tdb->open){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
TDBUNLOCKMETHOD(tdb);
return INT_MIN;
} |
functions | double tctdbadddouble(TCTDB *tdb, const void *pkbuf, int pksiz, double num){
assert(tdb && pkbuf && pksiz >= 0);
if(!TDBLOCKMETHOD(tdb, true)) return INT_MIN;
if(!tdb->open){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
TDBUNLOCKMETHOD(tdb);
return INT_MIN;
} |
functions | bool tctdbsync(TCTDB *tdb){
assert(tdb);
if(!TDBLOCKMETHOD(tdb, true)) return false;
if(!tdb->open || !tdb->wmode || tdb->tran){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
TDBUNLOCKMETHOD(tdb);
return false;
} |
functions | bool tctdboptimize(TCTDB *tdb, int64_t bnum, int8_t apow, int8_t fpow, uint8_t opts){
assert(tdb);
if(!TDBLOCKMETHOD(tdb, true)) return false;
if(!tdb->open || !tdb->wmode || tdb->tran){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
TDBUNLOCKMETHOD(tdb);
return false;
} |
functions | bool tctdbvanish(TCTDB *tdb){
assert(tdb);
if(!TDBLOCKMETHOD(tdb, true)) return false;
if(!tdb->open || !tdb->wmode || tdb->tran){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
TDBUNLOCKMETHOD(tdb);
return false;
} |
functions | bool tctdbcopy(TCTDB *tdb, const char *path){
assert(tdb && path);
if(!TDBLOCKMETHOD(tdb, false)) return false;
if(!tdb->open){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
TDBUNLOCKMETHOD(tdb);
return false;
} |
functions | bool tctdbtranbegin(TCTDB *tdb){
assert(tdb);
for(double wsec = 1.0 / sysconf(_SC_CLK_TCK); true; wsec *= 2){
if(!TDBLOCKMETHOD(tdb, true)) return false;
if(!tdb->open || !tdb->wmode){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
TDBUNLOCKMETHOD(tdb);
return false;
} |
functions | bool tctdbtrancommit(TCTDB *tdb){
assert(tdb);
if(!TDBLOCKMETHOD(tdb, true)) return false;
if(!tdb->open || !tdb->wmode || !tdb->tran){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
TDBUNLOCKMETHOD(tdb);
return false;
} |
functions | bool tctdbtranabort(TCTDB *tdb){
assert(tdb);
if(!TDBLOCKMETHOD(tdb, true)) return false;
if(!tdb->open || !tdb->wmode || !tdb->tran){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
TDBUNLOCKMETHOD(tdb);
return false;
} |
functions | uint64_t tctdbrnum(TCTDB *tdb){
assert(tdb);
if(!TDBLOCKMETHOD(tdb, false)) return 0;
if(!tdb->open){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
TDBUNLOCKMETHOD(tdb);
return 0;
} |
functions | uint64_t tctdbfsiz(TCTDB *tdb){
assert(tdb);
if(!TDBLOCKMETHOD(tdb, false)) return 0;
if(!tdb->open){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
TDBUNLOCKMETHOD(tdb);
return 0;
} |
functions | bool tctdbsetindex(TCTDB *tdb, const char *name, int type){
assert(tdb && name);
if(!TDBLOCKMETHOD(tdb, true)) return false;
if(!tdb->open || !tdb->wmode || tdb->tran){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
TDBUNLOCKMETHOD(tdb);
return false;
} |
functions | int64_t tctdbgenuid(TCTDB *tdb){
assert(tdb);
if(!TDBLOCKMETHOD(tdb, true)) return -1;
if(!tdb->open || !tdb->wmode){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
TDBUNLOCKMETHOD(tdb);
return -1;
} |
functions | void tctdbqrydel(TDBQRY *qry){
assert(qry);
tcxstrdel(qry->hint);
TCFREE(qry->oname);
TDBCOND *conds = qry->conds;
int cnum = qry->cnum;
for(int i = 0; i < cnum; i++){
TDBCOND *cond = conds + i;
if(cond->ftsunits){
TDBFTSUNIT *ftsunits = cond->ftsunits;
int ftsnum = cond->ftsnum;
f... |
functions | void tctdbqryaddcond(TDBQRY *qry, const char *name, int op, const char *expr){
assert(qry && name && expr);
int cnum = qry->cnum;
TCREALLOC(qry->conds, qry->conds, sizeof(qry->conds[0]) * (cnum + 1));
TDBCOND *cond = qry->conds + cnum;
int nsiz = strlen(name);
int esiz = strlen(expr);
TCMEMDUP(cond->name,... |
functions | void tctdbqrysetorder(TDBQRY *qry, const char *name, int type){
assert(qry && name);
if(qry->oname) TCFREE(qry->oname);
qry->oname = tcstrdup(name);
qry->otype = type;
} |
functions | void tctdbqrysetlimit(TDBQRY *qry, int max, int skip){
assert(qry);
qry->max = (max >= 0) ? max : INT_MAX;
qry->skip = (skip > 0) ? skip : 0;
} |
functions | bool tctdbqrysearchout(TDBQRY *qry){
assert(qry);
return tctdbqryproc(qry, tctdbqryprocoutcb, NULL);
} |
functions | bool tctdbqryproc(TDBQRY *qry, TDBQRYPROC proc, void *op){
assert(qry && proc);
TCTDB *tdb = qry->tdb;
if(!TDBLOCKMETHOD(tdb, true)) return false;
if(!tdb->open || !tdb->wmode){
tctdbsetecode(tdb, TCEINVALID, __FILE__, __LINE__, __func__);
TDBUNLOCKMETHOD(tdb);
return false;
} |
functions | else if(flags & TDBQPOUT){
if(tctdboutimpl(tdb, pkbuf, pksiz)){
outnum++;
} |
functions | else if(type == TDBMSISECT){
int omax = qrys[0]->max;
int oskip = qrys[0]->skip;
qrys[0]->max = INT_MAX;
qrys[0]->skip = 0;
TCLIST *res = tctdbqrysearch(qrys[0]);
qrys[0]->max = omax;
qrys[0]->skip = oskip;
int rnum = TCLISTNUM(res);
for(int i = 0; i < rnum; i++){
const char *p... |
functions | else if(type == TDBMSDIFF){
int omax = qrys[0]->max;
int oskip = qrys[0]->skip;
qrys[0]->max = INT_MAX;
qrys[0]->skip = 0;
TCLIST *res = tctdbqrysearch(qrys[0]);
qrys[0]->max = omax;
qrys[0]->skip = oskip;
int rnum = TCLISTNUM(res);
for(int i = 0; i < rnum; i++){
const char *pk... |
functions | void tctdbsetecode(TCTDB *tdb, int ecode, const char *filename, int line, const char *func){
assert(tdb && filename && line >= 1 && func);
tchdbsetecode(tdb->hdb, ecode, filename, line, func);
} |
functions | void tctdbsetdbgfd(TCTDB *tdb, int fd){
assert(tdb && fd >= 0);
tchdbsetdbgfd(tdb->hdb, fd);
} |
functions | int tctdbdbgfd(TCTDB *tdb){
assert(tdb);
return tchdbdbgfd(tdb->hdb);
} |
functions | bool tctdbhasmutex(TCTDB *tdb){
assert(tdb);
return tdb->mmtx != NULL;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.