本文整理汇总了C++中PROC函数的典型用法代码示例。如果您正苦于以下问题:C++ PROC函数的具体用法?C++ PROC怎么用?C++ PROC使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PROC函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: procfs_doprocdbregs
int
procfs_doprocdbregs(PFS_FILL_ARGS)
{
int error;
struct dbreg r;
struct thread *td2;
#ifdef COMPAT_FREEBSD32
struct dbreg32 r32;
int wrap32 = 0;
#endif
if (uio->uio_offset != 0)
return (0);
PROC_LOCK(p);
KASSERT(p->p_lock > 0, ("proc not held"));
if (p_candebug(td, p) != 0) {
PROC_UNLOCK(p);
return (EPERM);
}
td2 = FIRST_THREAD_IN_PROC(p);
#ifdef COMPAT_FREEBSD32
if (SV_CURPROC_FLAG(SV_ILP32)) {
if (SV_PROC_FLAG(td2->td_proc, SV_ILP32) == 0) {
PROC_UNLOCK(p);
return (EINVAL);
}
wrap32 = 1;
}
#endif
error = PROC(read, dbregs, td2, &r);
if (error == 0) {
PROC_UNLOCK(p);
error = UIOMOVE_FROMBUF(r, uio);
PROC_LOCK(p);
}
if (error == 0 && uio->uio_rw == UIO_WRITE) {
if (!P_SHOULDSTOP(p)) /* XXXKSE should be P_TRACED? */
error = EBUSY;
else
/* XXXKSE: */
error = PROC(write, dbregs, td2, &r);
}
PROC_UNLOCK(p);
return (error);
}
开发者ID:AhmadTux,项目名称:freebsd,代码行数:48,代码来源:procfs_dbregs.c
示例2: xdr_to_generic_payload
ssize_t
xdr_to_generic_payload(struct iovec inmsg, void *args, xdrproc_t proc,
struct iovec *pendingpayload)
{
XDR xdr;
ssize_t ret = -1;
if ((!inmsg.iov_base) || (!args) || (!proc))
return -1;
xdrmem_create(&xdr, inmsg.iov_base, (unsigned int)inmsg.iov_len,
XDR_DECODE);
if (!PROC(&xdr, args)) {
ret = -1;
goto ret;
}
ret = xdr_decoded_length(xdr);
if (pendingpayload) {
pendingpayload->iov_base = xdr_decoded_remaining_addr(xdr);
pendingpayload->iov_len = xdr_decoded_remaining_len(xdr);
}
ret:
return ret;
}
开发者ID:amarts,项目名称:glusterfs,代码行数:28,代码来源:xdr-generic.c
示例3: AreLegacyFunctionsSupported
static
BOOLEAN
AreLegacyFunctionsSupported(VOID)
{
int Error;
if (!PROC(WSACancelBlockingCall) || !PROC(WSAGetLastError))
return FALSE;
Error = pWSACancelBlockingCall();
ok(Error == SOCKET_ERROR, "Error = %d\n", Error);
ok(pWSAGetLastError() == WSAEOPNOTSUPP ||
pWSAGetLastError() == WSAEINVAL, "WSAGetLastError = %d\n", pWSAGetLastError());
return pWSAGetLastError() != WSAEOPNOTSUPP;
}
开发者ID:mutoso-mirrors,项目名称:reactos,代码行数:16,代码来源:InternetOpen.c
示例4: FtpGetFile
BOOL FtpGetFile(Connection *Connect,LPCSTR lpszRemoteFile,LPCSTR lpszNewFile,BOOL Reget,int AsciiMode)
{
PROC(("FtpGetFile","[%s]->[%s] %s %s",lpszRemoteFile,lpszNewFile,Reget?"REGET":"NEW",AsciiMode?"ASCII":"BIN"));
String Command,
full_name;
int ExitCode;
Assert(Connect && "FtpGetFile");
//mode
if(AsciiMode && !Connect->ProcessCommand("ascii"))
{
Log(("!ascii ascii:%d",AsciiMode));
return FALSE;
}
else if(!AsciiMode && !Connect->ProcessCommand("bin"))
{
Log(("!bin ascii:%d",AsciiMode));
return FALSE;
}
//Create directory
Command = lpszNewFile;
int m = Command.RChr('/');
if(m != -1)
{
Command.SetLength(m);
if(!DoCreateDirectory(Command.c_str()))
{
Log(("!CreateDirectory [%s]",Command.c_str()));
return FALSE;
}
}
//Remote file
if(Connect->Host.ServerType!=FTP_TYPE_MVS && *lpszRemoteFile != '/')
{
full_name = Connect->CurDir; //Connect->ToOEMDup(Connect->CurDir.c_str());
AddEndSlash(full_name, '/');
full_name.Add(lpszRemoteFile);
lpszRemoteFile = full_name.c_str();
}
//Get file
Connect->IOCallback = TRUE;
if(Reget && !Connect->ResumeSupport)
{
Connect->AddCmdLine(FMSG(MResumeRestart));
Reget = FALSE;
}
Command.printf("%s \x1%s\x1 \x1%s\x1",
Reget ? "reget":"get",
lpszRemoteFile, lpszNewFile);
ExitCode = Connect->ProcessCommand(Command);
Connect->IOCallback = FALSE;
return ExitCode;
}
开发者ID:elfmz,项目名称:far2l,代码行数:60,代码来源:FtpAPI.cpp
示例5: ALLOC
object *primitive_procedure(primitive_proc proc)
{
object *p = ALLOC(object);
TYPE(p) = OBJ_PRIMITIVE_PROCEDURE;
PROC(p) = proc;
return p;
}
开发者ID:medici,项目名称:Scheme-1,代码行数:7,代码来源:object.c
示例6: PROC
void Connection::site(int argc, char *argv[])
{
PROC(("site","%d [%s,%s,%s]",argc,(argc>=1)?argv[0]:"nil",(argc>=2)?argv[1]:"nil",(argc>=3)?argv[2]:"nil"));
int i;
char buf[BUFSIZ];
if(argc < 2)
{
code = -1;
return;
}
strcpy(buf, Opt.cmdSite);
strcat(buf, " ");
strcat(buf, argv[1]);
for(i = 2; i < argc; i++)
{
strcat(buf, " ");
strcat(buf, argv[i]);
}
if(command(buf) == RPL_PRELIM)
while(getreply(0) == RPL_PRELIM);
}
开发者ID:elfmz,项目名称:far2l,代码行数:25,代码来源:ConnectCmds.cpp
示例7: PROC
//---------------------------------------------------------------------------------
void FTP::SaveUsedDirNFile(void)
{
PROC(("SaveUsedDirNFile","was:(%s,%s)",Host.Home,SelectFile.c_str()))
PanelInfo pi;
//Save current file to restore
if(!ShowHosts && hConnect)
{
String s;
FtpGetCurrentDirectory(hConnect,s);
StrCpy(Host.Home, s.c_str(), ARRAYSIZE(Host.Home));
}
//Save current file to restore
if(FP_Info->Control(this,FCTL_GETPANELINFO,&pi))
{
if(pi.ItemsNumber > 0 && pi.CurrentItem < pi.ItemsNumber)
{
SelectFile = FTP_FILENAME(&pi.PanelItems[pi.CurrentItem]);
Log(("SetLastHost: [%s]", SelectFile.c_str()));
}
Log(("Saved (%s,%s)",Host.Home,SelectFile.c_str()));
}
}
开发者ID:CyberShadow,项目名称:FAR,代码行数:26,代码来源:fUtils.cpp
示例8: xdr_to_generic
ssize_t
xdr_to_generic(struct iovec inmsg, void *args, xdrproc_t proc)
{
XDR xdr;
ssize_t ret = -1;
if ((!inmsg.iov_base) || (!args) || (!proc))
return -1;
xdrmem_create(&xdr, inmsg.iov_base, (unsigned int)inmsg.iov_len,
XDR_DECODE);
if (!PROC(&xdr, args)) {
ret = -1;
goto ret;
}
ret = xdr_decoded_length(xdr);
ret:
return ret;
}
开发者ID:amarts,项目名称:glusterfs,代码行数:21,代码来源:xdr-generic.c
示例9: xdr_serialize_generic
ssize_t
xdr_serialize_generic(struct iovec outmsg, void *res, xdrproc_t proc)
{
ssize_t ret = -1;
XDR xdr;
if ((!outmsg.iov_base) || (!res) || (!proc))
return -1;
xdrmem_create(&xdr, outmsg.iov_base, (unsigned int)outmsg.iov_len,
XDR_ENCODE);
if (!PROC(&xdr, res)) {
ret = -1;
goto ret;
}
ret = xdr_encoded_length(xdr);
ret:
return ret;
}
开发者ID:amarts,项目名称:glusterfs,代码行数:22,代码来源:xdr-generic.c
注:本文中的PROC函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论