本文整理汇总了C++中PTRACE函数的典型用法代码示例。如果您正苦于以下问题:C++ PTRACE函数的具体用法?C++ PTRACE怎么用?C++ PTRACE使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PTRACE函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PTRACE
bool GMAudioInputManager_ptlib::set_device (const Ekiga::AudioInputDevice & device)
{
if ( device.type == DEVICE_TYPE ) {
PTRACE(4, "GMAudioInputManager_ptlib\tSetting Device " << device);
current_state.device = device;
return true;
}
return false;
}
示例2: ekiga_dbus_component_get_user_comment
static gboolean
ekiga_dbus_component_get_user_comment (G_GNUC_UNUSED EkigaDBusComponent *self,
char **comment,
G_GNUC_UNUSED GError **error)
{
PTRACE (1, "DBus\tGetComment");
*comment = gm_conf_get_string (PERSONAL_DATA_KEY "comment");
return TRUE;
}
示例3: Java_com_sun_netstorage_samqfs_mgmt_fs_Host_getMetadataServerName
JNIEXPORT jstring JNICALL
Java_com_sun_netstorage_samqfs_mgmt_fs_Host_getMetadataServerName(
JNIEnv *env, jclass cls /*ARGSUSED*/, jobject ctx, jstring fsName) {
jboolean isCopy;
char *cstr = GET_STR(fsName, isCopy);
char *res = NULL;
PTRACE(1, "jni:Host_getMetadataServerName() entry");
if (-1 == get_mds_host(CTX, cstr, &res)) {
REL_STR(fsName, cstr, isCopy);
ThrowEx(env);
return (NULL);
}
REL_STR(fsName, cstr, isCopy);
PTRACE(1, "jni:Host_getMetadataServerName() done");
return (JSTRING(res));
}
示例4: ekiga_dbus_component_get_user_location
static gboolean
ekiga_dbus_component_get_user_location (G_GNUC_UNUSED EkigaDBusComponent *self,
char **location,
G_GNUC_UNUSED GError **error)
{
PTRACE (1, "DBus\tGetLocation");
*location = gm_conf_get_string (PERSONAL_DATA_KEY "location");
return TRUE;
}
示例5: Java_com_sun_netstorage_samqfs_mgmt_fs_Host_setAdvancedNetCfg
JNIEXPORT void JNICALL
Java_com_sun_netstorage_samqfs_mgmt_fs_Host_setAdvancedNetCfg(JNIEnv *env,
jclass cls /*ARGSUSED*/, jobject ctx, jstring fsName,
jobjectArray host_strs) {
jboolean isCopy;
char *cstr = GET_STR(fsName, isCopy);
PTRACE(1, "jni:Host_setAdvancedNetCfg() entry");
if (-1 == set_advanced_network_cfg(CTX, cstr,
jarray2lst(env, host_strs, "java/lang/String", String2charr))) {
REL_STR(fsName, cstr, isCopy);
ThrowEx(env);
return;
}
REL_STR(fsName, cstr, isCopy);
PTRACE(1, "jni:Host_setAdvancedNetCfg() done");
}
示例6: relfs2ReleaserJob
jobject
relfs2ReleaserJob(JNIEnv *env, void *v_relfs) {
jclass cls;
jmethodID mid;
jobject newObj;
release_fs_t *relfs = (release_fs_t *)v_relfs;
PTRACE(1, "jni:relfs2ReleaserJob() entry");
cls = (*env)->FindClass(env, BASEPKG"/rel/ReleaserJob");
/* call the private constructor to initialize all fields */
mid = (*env)->GetMethodID(env, cls, "<init>",
"(Ljava/lang/String;SS)V");
newObj = (*env)->NewObject(env, cls, mid,
JSTRING(relfs->fi_name),
(jshort)relfs->fi_low,
(jshort)relfs->used_pct);
PTRACE(1, "jni:relfs2ReleaserJob() done");
return (newObj);
}
示例7: locker
void VideoGrabber::startCall()
{
PWaitAndSignal locker( mutex );
// if( state == SCall ) return;
PTRACE( 6, "VideoGrabber::startCall" );
state = SCall;
preparing = true;
if( IsSuspended() ) Resume();
}
示例8: PTRACE
void VideoGrabber::closeReader()
{
PTRACE( 6, "VideoGrabber::closeReader" );
if( videoReader ) {
channel->CloseVideoReader();
videoReader = 0;
ancaInfo->setInt( VG_STATE, VG_CLOSED );
}
}
示例9: Java_com_sun_netstorage_samqfs_mgmt_SamFSConnection_reinit
JNIEXPORT void JNICALL
Java_com_sun_netstorage_samqfs_mgmt_SamFSConnection_reinit(JNIEnv *env,
jobject samConn) {
ctx_t ctx;
PTRACE(1, "jni:SamFSConnection_reinit() entry");
ctx.dump_path[0] = '\0';
ctx.read_location[0] = '\0';
ctx.user_id[0] = '\0';
ctx.handle = (samrpc_client_t *)getConnHandle(env, samConn);
/* reinitialize library */
PTRACE(1, "jni:reinitializing libfsmgmt");
if (-1 == init_sam_mgmt(&ctx)) {
ThrowEx(env);
return;
}
PTRACE(1, "jni:SamFSConnection_reinit() done");
}
示例10: is_faults_gen_status_on
/*
* is_faults_gen_status_on
* Function to get the status of fault generation
*
* The status of SNMP events generation is dependent on setting
* "alerts = on" in defaults.conf
*
* If there is an error, the return value is set to the return value from the
* server API. The samerrno and samerrmsg are passed on to the client
*/
int
is_faults_gen_status_on(
ctx_t *ctx, /* client connection */
boolean_t *faults_gen_status /* status of fault generation */
)
{
int ret_val;
ctx_arg_t arg;
samrpc_result_t result;
char *func_name = "rpc:is faults gen status on";
char *err_msg;
enum clnt_stat stat;
PTRACE(2, "%s entry", func_name);
CHECK_CLIENT_HANDLE(ctx, func_name);
if (ISNULL(faults_gen_status)) {
PTRACE(2, "%s exit %s", func_name, samerrmsg);
return (-1);
}
PTRACE(3, "%s calling RPC...", func_name);
memset((char *)&result, 0, sizeof (result));
arg.ctx = ctx;
SAMRPC_CLNT_CALL(samrpc_is_faults_gen_status_on, ctx_arg_t);
CHECK_FUNCTION_FAILURE(result, func_name);
ret_val = result.status;
*faults_gen_status = *((boolean_t *)
result.samrpc_result_u.result.result_data);
free(result.samrpc_result_u.result.result_data);
PTRACE(2, "%s returning with status [%d]...", func_name, ret_val);
PTRACE(2, "%s exit", func_name);
return (ret_val);
}
示例11: lst2jintArray
/*
* convert a C list of int to a jIntArray
*/
jintArray
lst2jintArray(JNIEnv *env,
sqm_lst_t *lst) {
jintArray jarr;
node_t *node = NULL;
int idx = 0;
jint *p = NULL;
if (NULL == lst) {
PTRACE(1, "jni:lst2jintArray(null). return.");
return (NULL);
} else {
PTRACE(2, "jni:lst2jintArray(lst[%d])", lst->length);
if (lst->length > 0) {
p = (jint *) malloc(lst->length * sizeof (jint));
}
}
jarr = (*env)->NewIntArray(env, lst->length);
if (NULL == jarr) {
PTRACE(1, "jni:cannot create jintArray");
return (NULL);
}
node = lst->head;
while (node) {
// TRACE("jni:lst2jintArray:building node %d", idx);
p[idx] = *(int *)node->data;
PTRACE(2, "eq: %d\n", p[idx]);
node = node->next;
idx++;
}
(*env)->SetIntArrayRegion(env, jarr, 0, lst->length, p);
if (p != NULL) {
free(p);
}
PTRACE(2, "jni:lst2jintArray() done");
return (jarr);
}
示例12: Java_com_sun_netstorage_samqfs_mgmt_fs_Restore_getParams
JNIEXPORT jstring JNICALL
Java_com_sun_netstorage_samqfs_mgmt_fs_Restore_getParams(JNIEnv *env,
jclass cls /*ARGSUSED*/, jobject ctx, jstring fsname) {
char *str = NULL;
jboolean isCopy;
char *cstr = GET_STR(fsname, isCopy);
PTRACE(1, "jni:Restore_getParams(..., %s)", Str(cstr));
if (-1 == get_csd_params(CTX, cstr, &str)) {
REL_STR(fsname, cstr, isCopy);
ThrowEx(env);
return (NULL);
}
REL_STR(fsname, cstr, isCopy);
PTRACE(1, "jni:Restore_getParams() done %s", Str(str));
return (JSTRING(str));
}
示例13: Create
template <class CodecClass> static void * Create(const PluginCodec_Definition * defn)
{
// PTRACE(1, "Plugin", "static void * Create................11111......11111....111");
CodecClass * codec = new CodecClass(defn);
// PTRACE(1, "Plugin", "static void * Create................22222......22222....22");
if (codec != NULL && codec->Construct())
return codec;
PTRACE(1, "Plugin", "Could not open codec, no context being returned.");
delete codec;
return NULL;
}
示例14: EWLFreeRefFrm
/*------------------------------------------------------------------------------
Function name : EWLFreeRefFrm
Description : Release a frame buffer previously allocated with
EWLMallocRefFrm.
Return type : void
Argument : const void * instance - EWL instance
Argument : EWLLinearMem_t *info - frame buffer memory information
------------------------------------------------------------------------------*/
void EWLFreeRefFrm(const void *instance, EWLLinearMem_t * info)
{
hx280ewl_t *enc_ewl = (hx280ewl_t *) instance;
EWLLinearMem_t *buff = (EWLLinearMem_t *) info;
assert(enc_ewl != NULL);
assert(buff != NULL);
EWLFreeLinear(enc_ewl, buff);
PTRACE("------>EWLFreeRefFrm\t%p\n", buff->virtualAddress);
}
示例15: PTRACE
bool GMAudioOutputManager_null::set_device (Ekiga::AudioOutputPS ps, const Ekiga::AudioOutputDevice & device)
{
if ( ( device.type == DEVICE_TYPE ) &&
( device.source == DEVICE_SOURCE) &&
( device.name == DEVICE_NAME) ) {
PTRACE(4, "GMAudioOutputManager_null\tSetting Device[" << ps << "] " << device);
current_state[ps].device = device;
return true;
}
return false;
}