本文整理汇总了C++中USED函数的典型用法代码示例。如果您正苦于以下问题:C++ USED函数的具体用法?C++ USED怎么用?C++ USED使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了USED函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: trapUSR2
static void
trapUSR2(int signo)
{
USED(signo);
/* we've done our work of interrupting sigsuspend */
}
示例3: dopermw
int
dopermw(Ram *r)
{
USED(r);
return 0;
}
示例4: USED
void
runtime·netpollarm(uintptr fd, int32 mode)
{
USED(fd, mode);
runtime·throw("unused");
}
示例5: ext2datablock
static Block*
ext2datablock(Ext2 *fs, u32int bno, int size)
{
USED(size);
return ext2blockread(fs->fsys, bno);
}
示例6: sysexec
//.........这里部分代码省略.........
/*
* Args: pass 2: assemble; the pages will be faulted in
*/
tos = (Tos*)(TSTKTOP - sizeof(Tos));
tos->cyclefreq = m->cyclefreq;
cycles((uvlong*)&tos->pcycles);
tos->pcycles = -tos->pcycles;
tos->kcycles = tos->pcycles;
tos->clock = 0;
argv = (char**)(TSTKTOP - ssize);
charp = (char*)(TSTKTOP - nbytes);
args = charp;
if(indir)
argp = progarg;
else
argp = (char**)arg[1];
for(i=0; i<nargs; i++){
if(indir && *argp==0) {
indir = 0;
argp = (char**)arg[1];
}
*argv++ = charp + (USTKTOP-TSTKTOP);
n = strlen(*argp) + 1;
memmove(charp, *argp++, n);
charp += n;
}
free(file0);
free(up->text);
up->text = elem;
elem = nil; /* so waserror() won't free elem */
USED(elem);
/* copy args; easiest from new process's stack */
n = charp - args;
if(n > 128) /* don't waste too much space on huge arg lists */
n = 128;
a = up->args;
up->args = nil;
free(a);
up->args = smalloc(n);
memmove(up->args, args, n);
if(n>0 && up->args[n-1]!='\0'){
/* make sure last arg is NUL-terminated */
/* put NUL at UTF-8 character boundary */
for(i=n-1; i>0; --i)
if(fullrune(up->args+i, n-i))
break;
up->args[i] = 0;
n = i+1;
}
up->nargs = n;
/*
* Committed.
* Free old memory.
* Special segments are maintained across exec
*/
for(i = SSEG; i <= BSEG; i++) {
putseg(up->seg[i]);
/* prevent a second free if we have an error */
up->seg[i] = 0;
}
for(i = BSEG+1; i < NSEG; i++) {
示例7: handlefullmsg
void
handlefullmsg(Conn *c, Achan *a)
{
int i;
uint32_t chan, len, n, rt;
uint8_t type;
Msg *m, mm;
Msg *r;
Key *k;
int nk;
mpint *mod, *ek, *chal;
uint8_t sessid[16];
uint8_t chalbuf[32];
uint8_t digest[16];
DigestState *s;
static int first;
assert(a->len == a->ndata);
chan = a->chan;
mm.rp = a->data;
mm.ep = a->data+a->ndata;
mm.c = c;
m = &mm;
type = getbyte(m);
if(first == 0){
first++;
fmtinstall('H', encodefmt);
}
switch(type){
default:
debug(DBG_AUTH, "unknown msg type\n");
Failure:
debug(DBG_AUTH, "agent sending failure\n");
r = allocmsg(m->c, SSH_MSG_CHANNEL_DATA, 13);
putlong(r, chan);
putlong(r, 5);
putlong(r, 1);
putbyte(r, SSH_AGENT_FAILURE);
sendmsg(r);
return;
case SSH_AGENTC_REQUEST_RSA_IDENTITIES:
debug(DBG_AUTH, "agent request identities\n");
nk = listkeys(&k);
if(nk < 0)
goto Failure;
len = 1+4; /* type, nk */
for(i=0; i<nk; i++){
len += 4;
len += 2+(mpsignif(k[i].ek)+7)/8;
len += 2+(mpsignif(k[i].mod)+7)/8;
len += 4+strlen(k[i].comment);
}
r = allocmsg(m->c, SSH_MSG_CHANNEL_DATA, 12+len);
putlong(r, chan);
putlong(r, len+4);
putlong(r, len);
putbyte(r, SSH_AGENT_RSA_IDENTITIES_ANSWER);
putlong(r, nk);
for(i=0; i<nk; i++){
debug(DBG_AUTH, "\t%B %B %s\n", k[i].ek, k[i].mod, k[i].comment);
putlong(r, mpsignif(k[i].mod));
putmpint(r, k[i].ek);
putmpint(r, k[i].mod);
putstring(r, k[i].comment);
mpfree(k[i].ek);
mpfree(k[i].mod);
free(k[i].comment);
}
free(k);
sendmsg(r);
break;
case SSH_AGENTC_RSA_CHALLENGE:
n = getlong(m);
USED(n); /* number of bits in key; who cares? */
ek = getmpint(m);
mod = getmpint(m);
chal = getmpint(m);
memmove(sessid, getbytes(m, 16), 16);
rt = getlong(m);
debug(DBG_AUTH, "agent challenge %B %B %B %ud (%p %p)\n",
ek, mod, chal, rt, m->rp, m->ep);
if(rt != 1 || dorsa(mod, ek, chal, chalbuf) < 0){
mpfree(ek);
mpfree(mod);
mpfree(chal);
goto Failure;
}
s = md5(chalbuf, 32, nil, nil);
md5(sessid, 16, digest, s);
r = allocmsg(m->c, SSH_MSG_CHANNEL_DATA, 12+1+16);
putlong(r, chan);
putlong(r, 4+16+1);
putlong(r, 16+1);
putbyte(r, SSH_AGENT_RSA_RESPONSE);
//.........这里部分代码省略.........
示例8: oslongjmp
void
oslongjmp(void *regs, osjmpbuf env, int val)
{
USED(regs);
longjmp(env, val);
}
示例9: SysUnused
void
SysUnused(void *v, uintptr n)
{
USED(v);
USED(n);
}
示例10: tready
int
tready(void *a)
{
USED(a);
return isched.runhd != nil || isched.vmq != nil;
}
示例11: USED
void
runtime·SysUsed(void *v, uintptr n)
{
USED(v);
USED(n);
}
示例12: USED
void
runtime·badsignal(int32 sig)
{
USED(sig);
runtime·pwrite(2, badsignal, sizeof badsignal - 1, -1LL);
}
示例13: portRNullPrint
static void
portRNullPrint(Fmt *fmt, PortRNull *x)
{
USED(x);
fmtprint(fmt, "%s", "PortRNull");
}
示例14: portTDumpPrint
static void
portTDumpPrint(Fmt *fmt, PortTDump *x)
{
USED(x);
fmtprint(fmt, "PortTDump");
}