📄 rvthread.c
字号:
#if (0)
************************************************************************
Filename :
Description:
************************************************************************
Copyright (c) 1999 RADVision Inc.
************************************************************************
NOTICE:
This document contains information that is proprietary to RADVision LTD.
No part of this publication may be reproduced in any form whatsoever
without written prior approval by RADVision LTD..
RADVision LTD. reserves the right to revise this publication and make
changes without obligation to notify any person of such revisions or
changes.
************************************************************************
************************************************************************
$Revision:$
$Date:$
$Author: S. Cipolli$
************************************************************************
#endif
#include <assert.h>
#include <string.h>
#include "rvlog.h"
#include "rvthread.h"
/* OS independent thread interface */
/* Very minimal implementation. */
RvThread* rvThreadConstruct(RvThread* t, const char* name, int priority,
size_t stackSize, RvThreadMainCB func, void* data) {
rvLogEnter(&rvLog, "rvThreadConstruct");
rvThreadConstruct_(t, name, priority, stackSize, func, data);
rvLogLeave(&rvLog, "rvThreadConstruct");
return t;
}
void rvThreadDestruct(RvThread* t) {
rvLogEnter(&rvLog, "rvThreadDestruct");
rvThreadDestruct_(t);
rvLogLeave(&rvLog, "rvThreadDestruct");
}
const char* rvThreadName(RvThread* t) {
const char* n;
rvLogEnter(&rvLog, "rvThreadName");
n = rvThreadName_(t);
rvLogLeave(&rvLog, "rvThreadName");
return n;
}
void rvThreadStart(RvThread* t) {
rvLogEnter(&rvLog, "rvThreadStart");
rvThreadStart_(t);
rvLogLeave(&rvLog, "rvThreadStart");
}
RvBool rvThreadJoin(RvThread* t) {
RvBool r;
rvLogEnter(&rvLog, "rvThreadJoin");
r = rvThreadJoin_(t);
rvLogLeave(&rvLog, "rvThreadJoin");
return r;
}
RvThread* rvThreadCurrent() {
RvThread* t;
rvLogEnter(&rvLog, "rvThreadCurrent");
t = rvThreadCurrent_();
rvLogLeave(&rvLog, "rvThreadCurrent");
return t;
}
void rvThreadSleep(unsigned int ms) {
rvLogEnter(&rvLog, "rvThreadSleep");
rvThreadSleep_(ms);
rvLogLeave(&rvLog, "rvThreadSleep");
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -