您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ DUMP函数代码示例

51自学网 2021-06-01 20:24:37
  C++
这篇教程C++ DUMP函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中DUMP函数的典型用法代码示例。如果您正苦于以下问题:C++ DUMP函数的具体用法?C++ DUMP怎么用?C++ DUMP使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了DUMP函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: x87_fwait

void x87_fwait( struct x86_function *p ){   DUMP();   emit_1ub(p, 0x9b);}
开发者ID:CPFDSoftware-Tony,项目名称:gmv,代码行数:5,


示例2: write_points

void write_points(const char *fname, DATA *d, DPOINT *where, double *est,	int n_outfl) {	static FILE *f = NULL;#ifdef HAVE_LIBGIS	static Site *site = NULL;	static int dim = 2;	int i;#endif 	if (! grass()) {		if (where == NULL) {			if (fname != NULL) {				f = efopen(fname, "w");				write_ascii_header(f, d, n_outfl);			} else				efclose(f);		} else {			if (f == NULL)				ErrMsg(ER_NULL, "write_points(): f");			output_line(f, d, where, est, n_outfl);		}	} else {#ifdef HAVE_LIBGIS		if (where == NULL) {			if (fname != NULL) { /* initialize: */				DUMP("opening grass sites list/n");				if (d->mode & Z_BIT_SET)					dim++;				if ((f = G_sites_open_new((char *) fname)) == NULL)					G_fatal_error("%s: cannot open sites file %f for writing/n",						G_program_name());				site = G_site_new_struct(CELL_TYPE, dim, 0, n_outfl);			} else { /* close: */				DUMP("closing grass sites list/n");				fclose(f);				dim = 2;				G_site_free_struct(site);				site = NULL;			}		} else {			assert(site != NULL);			assert(d != NULL);			/* fill site: */			site->east = where->x;			site->north = where->y;			if (d->mode & Z_BIT_SET)				site->dim[0] = where->z;			if (d->mode & S_BIT_SET)				site->ccat = where->u.stratum + strata_min;			else				site->ccat = GET_INDEX(where) + 1;			for (i = 0; i < n_outfl; i++) {				if (is_mv_double(&(est[i]))) {					site->dbl_att[i] = -9999.0;					if (DEBUG_DUMP)						printlog(" [%d]:mv ", i);				} else {					site->dbl_att[i] = est[i];					if (DEBUG_DUMP)						printlog(" value[%d]: %g ", i, site->dbl_att[i]);				}			}			if (DEBUG_DUMP)				printlog("/n");			G_site_put(f, site);		}#else 		ErrMsg(ER_IMPOSVAL, "gstat/grass error: libgis() not linked");#endif 	}}
开发者ID:Andlon,项目名称:cs267FinalProject,代码行数:72,


示例3: __attribute__

void __attribute__((__no_instrument_function__)) __cyg_profile_func_exit(void *this_func, void *call_site) {	DUMP(this_func, call_site);}
开发者ID:qixingyue,项目名称:nginx,代码行数:3,


示例4: caml_dump_r

CAMLprim value caml_dump_r(CAML_R, value string){  DUMP("%s", String_val(string));  return Val_unit;}
开发者ID:lefessan,项目名称:ocaml-multicore,代码行数:4,


示例5: filename

NS_IMETHODIMPnsStatusReporterManager::DumpReports(){  static unsigned number = 1;  nsresult rv;  nsCString filename("status-reports-");  filename.AppendInt(getpid());  filename.Append('-');  filename.AppendInt(number++);  filename.AppendLiteral(".json");  // Open a file in NS_OS_TEMP_DIR for writing.  // The file is initialized as "incomplete-status-reports-pid-number.json" in the  // begining, it will be rename as "status-reports-pid-number.json" in the end.  nsCOMPtr<nsIFile> tmpFile;  rv = nsDumpUtils::OpenTempFile(NS_LITERAL_CSTRING("incomplete-") +                                 filename,                                 getter_AddRefs(tmpFile),                                 NS_LITERAL_CSTRING("status-reports"));  if (NS_WARN_IF(NS_FAILED(rv))) {    return rv;  }  nsCOMPtr<nsIFileOutputStream> ostream =    do_CreateInstance("@mozilla.org/network/file-output-stream;1");  rv = ostream->Init(tmpFile, -1, -1, 0);  if (NS_WARN_IF(NS_FAILED(rv))) {    return rv;  }  //Write the reports to the file  DUMP(ostream, "{/n/"subject/":/"about:service reports/",/n");  DUMP(ostream, "/"reporters/": [ ");  nsCOMPtr<nsISimpleEnumerator> e;  bool more, first = true;  EnumerateReporters(getter_AddRefs(e));  while (NS_SUCCEEDED(e->HasMoreElements(&more)) && more) {    nsCOMPtr<nsISupports> supports;    e->GetNext(getter_AddRefs(supports));    nsCOMPtr<nsIStatusReporter> r = do_QueryInterface(supports);    nsCString process;    rv = r->GetProcess(process);    if (NS_WARN_IF(NS_FAILED(rv))) {      return rv;    }    nsCString name;    rv = r->GetName(name);    if (NS_WARN_IF(NS_FAILED(rv))) {      return rv;    }    nsCString description;    rv = r->GetDescription(description);    if (NS_WARN_IF(NS_FAILED(rv))) {      return rv;    }    if (first) {      first = false;    } else {      DUMP(ostream, ",");    }    rv = DumpReport(ostream, process, name, description);    if (NS_WARN_IF(NS_FAILED(rv))) {      return rv;    }  }  DUMP(ostream, "/n]/n}/n");  rv = ostream->Close();  if (NS_WARN_IF(NS_FAILED(rv))) {    return rv;  }  // Rename the status reports file  nsCOMPtr<nsIFile> srFinalFile;  rv = NS_GetSpecialDirectory(NS_OS_TEMP_DIR, getter_AddRefs(srFinalFile));  if (NS_WARN_IF(NS_FAILED(rv))) {    return rv;  }#ifdef ANDROID  rv = srFinalFile->AppendNative(NS_LITERAL_CSTRING("status-reports"));  if (NS_WARN_IF(NS_FAILED(rv))) {    return rv;  }#endif  rv = srFinalFile->AppendNative(filename);  if (NS_WARN_IF(NS_FAILED(rv))) {    return rv;  }  rv = srFinalFile->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 0600);//.........这里部分代码省略.........
开发者ID:MichaelKohler,项目名称:gecko-dev,代码行数:101,


示例6: zix_tree_insert

ZIX_API ZixStatuszix_tree_insert(ZixTree* t, void* e, ZixTreeIter** ti){	DEBUG_PRINTF("**** INSERT %ld/n", (intptr_t)e);	int          cmp = 0;	ZixTreeNode* n   = t->root;	ZixTreeNode* p   = NULL;	// Find the parent p of e	while (n) {		p   = n;		cmp = t->cmp(e, n->data, t->cmp_data);		if (cmp < 0) {			n = n->left;		} else if (cmp > 0) {			n = n->right;		} else if (t->allow_duplicates) {			n = n->right;		} else {			if (ti) {				*ti = n;			}			DEBUG_PRINTF("%ld EXISTS!/n", (intptr_t)e);			return ZIX_STATUS_EXISTS;		}	}	// Allocate a new node n	if (!(n = (ZixTreeNode*)malloc(sizeof(ZixTreeNode)))) {		return ZIX_STATUS_NO_MEM;	}	memset(n, '/0', sizeof(ZixTreeNode));	n->data    = e;	n->balance = 0;	if (ti) {		*ti = n;	}	bool p_height_increased = false;	// Make p the parent of n	n->parent = p;	if (!p) {		t->root = n;	} else {		if (cmp < 0) {			assert(!p->left);			assert(p->balance == 0 || p->balance == 1);			p->left = n;			--p->balance;			p_height_increased = !p->right;		} else {			assert(!p->right);			assert(p->balance == 0 || p->balance == -1);			p->right = n;			++p->balance;			p_height_increased = !p->left;		}	}	DUMP(t);	// Rebalance if necessary (at most 1 rotation)	assert(!p || p->balance == -1 || p->balance == 0 || p->balance == 1);	if (p && p_height_increased) {		int height_change = 0;		for (ZixTreeNode* i = p; i && i->parent; i = i->parent) {			if (i == i->parent->left) {				if (--i->parent->balance == -2) {					zix_tree_rebalance(t, i->parent, &height_change);					break;				}			} else {				assert(i == i->parent->right);				if (++i->parent->balance == 2) {					zix_tree_rebalance(t, i->parent, &height_change);					break;				}			}			if (i->parent->balance == 0) {				break;			}		}	}	DUMP(t);	++t->size;#ifdef ZIX_TREE_VERIFY	if (!verify(t, t->root)) {		return ZIX_STATUS_ERROR;	}#endif	return ZIX_STATUS_SUCCESS;}
开发者ID:Cactuslegs,项目名称:audacity-of-nope,代码行数:98,


示例7: caml_deserialize_and_run_in_this_thread

/* Return 0 on success and non-zero on failure. */static int caml_deserialize_and_run_in_this_thread(caml_global_context *parent_context, char *blob, int index, sem_t *semaphore, /*out*/caml_global_context **to_context){#ifdef HAS_MULTICONTEXT  /* Make a new empty context, and use it to deserialize the blob into. */  CAML_R = caml_make_empty_context(); // ctx also becomes the thread-local context  //DUMPROOTS("splitting: from new thread");  CAMLparam0();  CAMLlocal1(function);  //FDUMPROOTS("splitting: from new thread after GC-protecting locals");  int did_we_fail;  caml_initialize_context_thread_support_r(ctx);  ctx->caml_start_code = parent_context->caml_start_code;  ctx->caml_code_size = parent_context->caml_code_size;  ctx->caml_saved_code = parent_context->caml_saved_code;#ifdef THREADED_CODE  ctx->caml_instr_table = parent_context->caml_instr_table;  ctx->caml_instr_base = parent_context->caml_instr_base;#endif // #ifdef THREADED_CODE#ifndef NATIVE_CODE  DUMP();  caml_init_code_fragments_r(ctx); // this is needed for caml_install_globals_and_data_as_c_byte_array_r  DUMP();  ctx->caml_prim_table = parent_context->caml_prim_table;  ctx->caml_prim_name_table = parent_context->caml_prim_name_table;#endif // #ifdef THREADED_CODE  *to_context = ctx;  caml_install_globals_and_data_as_c_byte_array_r(ctx, blob, &function);  DUMP("Done with the blob: index=%i/n", index);/*   //* We're done with the blob: unpin it via the semaphore, so that it *//*      can be destroyed when all split threads have deserialized. *// *//* //fprintf(stderr, "W5.5context %p] [thread %p] (index %i) EEEEEEEEEEEEEEEEEEEEEEEEEE/n", ctx, (void*)(pthread_self()), index); fflush(stderr); caml_release_global_lock(); *//*   DUMP("About to V the semaphore.  index=%i/n", index); *//*   sem_post(semaphore); */#ifndef NATIVE_CODE  DUMP();  caml_init_exceptions_r(ctx);  DUMP();  //caml_debugger_r(ctx, PROGRAM_START);#endif // #ifndef NATIVE_CODE  DUMP();  ctx->caml_exe_name = parent_context->caml_exe_name;  ctx->caml_main_argv = parent_context->caml_main_argv;  DUMP();  /* We're done with the blob: unpin it via the semaphore, so that it     can be destroyed when all split threads have deserialized. *///fprintf(stderr, "W5.5context %p] [thread %p] (index %i) EEEEEEEEEEEEEEEEEEEEEEEEEE/n", ctx, (void*)(pthread_self()), index); fflush(stderr); caml_release_global_lock();  //SLEEP("before V'ing the semaphore.", 3);  DUMP("About to V the semaphore.  index=%i/n", index);  //int sem_post_result = sem_post(semaphore);  //assert(sem_post_result == 0);  caml_v_semaphore(semaphore);  /* Now do the actual work, in a function which correctly GC-protects its locals: */  did_we_fail = caml_run_function_this_thread_r(ctx, function, index);  DUMP("$$$$$$$$$$$$$$$ ran the Caml code in a child context");  if(did_we_fail){    //DUMP("the Caml code failed"); // !!!!!!!!!!!!!!!!!!!!!!!!!!! What shall we do in this case?    //volatile int a = 1; a /= 0; /*die horribly*/    DUMP("the Caml code failed");    assert(0); // What shall we do in this case?  }  /* One less user for this context; the main thread is done: */  caml_unpin_context_r(ctx);  CAMLreturnT(int, did_we_fail);  /* //* We're done.  But we can't destroy the context yet, until it's */  /*    joined: the object must remain visibile to the OCaml code, and */  /*    for accessing the pthread_t objecet from the C join code. *// */  /* CAMLreturnT(int, did_we_fail); */#endif // #ifdef HAS_MULTICONTEXT  assert(0); // this must be unreachable if multi-context is disabled}
开发者ID:lefessan,项目名称:ocaml-multicore,代码行数:81,


示例8: x87_fscale

void x87_fscale( struct x86_function *p ){   DUMP();   emit_2ub(p, 0xd9, 0xfd);}
开发者ID:CPFDSoftware-Tony,项目名称:gmv,代码行数:5,


示例9: x87_fsincos

void x87_fsincos( struct x86_function *p ){   DUMP();   emit_2ub(p, 0xd9, 0xfb);}
开发者ID:CPFDSoftware-Tony,项目名称:gmv,代码行数:5,


示例10: x87_fchs

void x87_fchs( struct x86_function *p ){   DUMP();   emit_2ub(p, 0xd9, 0xe0);}
开发者ID:CPFDSoftware-Tony,项目名称:gmv,代码行数:5,


示例11: x87_fprndint

void x87_fprndint( struct x86_function *p ){   DUMP();   emit_2ub(p, 0xd9, 0xfc);}
开发者ID:CPFDSoftware-Tony,项目名称:gmv,代码行数:5,


示例12: x87_fabs

void x87_fabs( struct x86_function *p ){   DUMP();   emit_2ub(p, 0xd9, 0xe1);}
开发者ID:CPFDSoftware-Tony,项目名称:gmv,代码行数:5,


示例13: x87_ftst

void x87_ftst( struct x86_function *p ){   DUMP();   emit_2ub(p, 0xd9, 0xe4);}
开发者ID:CPFDSoftware-Tony,项目名称:gmv,代码行数:5,


示例14: x87_fnclex

void x87_fnclex( struct x86_function *p ){   DUMP();   emit_2ub(p, 0xdb, 0xe2);}
开发者ID:CPFDSoftware-Tony,项目名称:gmv,代码行数:5,


示例15: XI_VERIFY

intnsComponentsDlg::Show(int aDirection){    int err = OK;    int customSTIndex = 0, i;    int numRows = 0;    int currRow = 0;    GtkWidget *hbox = NULL;    XI_VERIFY(gCtx);    XI_VERIFY(gCtx->notebook);    if (mWidgetsInit == FALSE)    {        customSTIndex = gCtx->sdlg->GetNumSetupTypes();        sCustomST = gCtx->sdlg->GetSetupTypeList();        for (i=1; i<customSTIndex; i++)            sCustomST = sCustomST->GetNext();        DUMP(sCustomST->GetDescShort());        // create a new table and add it as a page of the notebook        mTable = gtk_table_new(5, 1, FALSE);        gtk_notebook_append_page(GTK_NOTEBOOK(gCtx->notebook), mTable, NULL);        mPageNum = gtk_notebook_get_current_page(GTK_NOTEBOOK(gCtx->notebook));        gtk_widget_show(mTable);        // 1st row: a label (msg0)        // insert a static text widget in the first row        GtkWidget *msg0 = gtk_label_new(mMsg0);        hbox = gtk_hbox_new(FALSE, 0);        gtk_box_pack_start(GTK_BOX(hbox), msg0, FALSE, FALSE, 0);        gtk_widget_show(hbox);        gtk_table_attach(GTK_TABLE(mTable), hbox, 0, 1, 1, 2,                         static_cast<GtkAttachOptions>(GTK_FILL | GTK_EXPAND),			             GTK_FILL, 20, 20);        gtk_widget_show(msg0);        // 2nd row: a CList with a check box for each row (short desc)        GtkWidget *list = NULL;        GtkWidget *scrollwin = NULL;        GtkStyle *style = NULL;        GdkBitmap *ch_mask = NULL;        GdkPixmap *checked = NULL;        GdkBitmap *un_mask = NULL;        GdkPixmap *unchecked = NULL;        gchar *dummy[2] = { " ", " " };        nsComponent *currComp = sCustomST->GetComponents()->GetHead();        GtkWidget *descLongTable = NULL;        GtkWidget *frame = NULL;        scrollwin = gtk_scrolled_window_new(NULL, NULL);        gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin),            GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);        list = gtk_clist_new(2);        gtk_clist_set_selection_mode(GTK_CLIST(list), GTK_SELECTION_BROWSE);        gtk_clist_column_titles_hide(GTK_CLIST(list));        gtk_clist_set_column_auto_resize(GTK_CLIST(list), 0, TRUE);        gtk_clist_set_column_auto_resize(GTK_CLIST(list), 1, TRUE);        // determine number of rows we'll need        numRows = sCustomST->GetComponents()->GetLengthVisible();        for (i = 0; i < numRows; i++)            gtk_clist_append(GTK_CLIST(list), dummy);            style = gtk_widget_get_style(gCtx->window);        checked = gdk_pixmap_create_from_xpm_d(gCtx->window->window, &ch_mask,                   &style->bg[GTK_STATE_NORMAL], (gchar **)check_on_xpm);        unchecked = gdk_pixmap_create_from_xpm_d(gCtx->window->window, &un_mask,                    &style->bg[GTK_STATE_NORMAL], (gchar **)check_off_xpm);        while ((currRow < numRows) && currComp) // paranoia!        {            if (!currComp->IsInvisible())            {                if (currComp->IsSelected())                     gtk_clist_set_pixmap(GTK_CLIST(list), currRow, 0,                                          checked, ch_mask);                else                    gtk_clist_set_pixmap(GTK_CLIST(list), currRow, 0,                                          unchecked, un_mask);                gtk_clist_set_text(GTK_CLIST(list), currRow, 1,                                   currComp->GetDescShort());                currRow++;            }            currComp = currComp->GetNext();        }        // by default, first row selected upon Show()        sCurrRowSelected = 0;         gtk_signal_connect(GTK_OBJECT(list), "select_row",                           GTK_SIGNAL_FUNC(RowSelected), NULL);        gtk_signal_connect(GTK_OBJECT(list), "key_press_event",                           GTK_SIGNAL_FUNC(KeyPressed), NULL);        gtk_container_add(GTK_CONTAINER(scrollwin), list);        gtk_widget_show(list);        gtk_widget_show(scrollwin);//.........这里部分代码省略.........
开发者ID:rn10950,项目名称:RetroZilla,代码行数:101,


示例16: x87_fsqrt

void x87_fsqrt( struct x86_function *p ){   DUMP();   emit_2ub(p, 0xd9, 0xfa);}
开发者ID:CPFDSoftware-Tony,项目名称:gmv,代码行数:5,


示例17: gtk_widget_get_style

voidnsComponentsDlg::ToggleRowSelection(GtkWidget *aWidget, gint aRow,                                    gboolean aToggleState){    int numRows = 0, currRow = 0;    GtkStyle *style = NULL;    GdkBitmap *ch_mask = NULL;    GdkPixmap *checked = NULL;    GdkBitmap *un_mask = NULL;    GdkPixmap *unchecked = NULL;    nsComponent *currComp = sCustomST->GetComponents()->GetHead();        style = gtk_widget_get_style(gCtx->window);    checked = gdk_pixmap_create_from_xpm_d(gCtx->window->window, &ch_mask,               &style->bg[GTK_STATE_NORMAL], (gchar **)check_on_xpm);    unchecked = gdk_pixmap_create_from_xpm_d(gCtx->window->window, &un_mask,                &style->bg[GTK_STATE_NORMAL], (gchar **)check_off_xpm);    numRows = sCustomST->GetComponents()->GetLengthVisible();    while ((currRow < numRows) && currComp) // paranoia!    {        if (!currComp->IsInvisible())        {            if (aRow == currRow)            {                // update long desc                gtk_label_set_text(GTK_LABEL(sDescLong),                                   currComp->GetDescLong());                gtk_widget_show(sDescLong);                if (aToggleState) {                  if (currComp->IsSelected()) {                    DUMP("Toggling off...");                    currComp->SetUnselected();                  } else {                    DUMP("Toggling on...");                    currComp->SetSelected();                  }                }                currComp->ResolveDependees(currComp->IsSelected(),                                            sCustomST->GetComponents());                break;            }            currRow++;        }        currComp = currComp->GetNext();    }    // after resolving dependees redraw all checkboxes in one fell swoop    currRow = 0;    currComp = sCustomST->GetComponents()->GetHead();    while ((currRow < numRows) && currComp) // paranoia!    {        if (!currComp->IsInvisible())        {            if (currComp->IsSelected())            {                gtk_clist_set_pixmap(GTK_CLIST(aWidget), currRow, 0,                                      checked, ch_mask);            }            else            {                gtk_clist_set_pixmap(GTK_CLIST(aWidget), currRow, 0,                                      unchecked, un_mask);            }            currRow++;        }        currComp = currComp->GetNext();    }}
开发者ID:rn10950,项目名称:RetroZilla,代码行数:70,


示例18: x87_fxtract

void x87_fxtract( struct x86_function *p ){   DUMP();   emit_2ub(p, 0xd9, 0xf4);}
开发者ID:CPFDSoftware-Tony,项目名称:gmv,代码行数:5,


示例19: zix_tree_remove

//.........这里部分代码省略.........		if (pp) {			*pp        = n->left;			to_balance = n->parent;		} else {			t->root = n->left;		}		n->left->parent = n->parent;		height_change   = -1;	} else {		// Replace n with in-order successor (leftmost child of right subtree)		ZixTreeNode* replace = n->right;		while (replace->left) {			assert(replace->left->parent == replace);			replace = replace->left;		}		// Remove replace from parent (replace_p)		if (replace->parent->left == replace) {			height_change = replace->parent->right ? 0 : -1;			d_balance     = 1;			to_balance    = replace->parent;			replace->parent->left = replace->right;		} else {			assert(replace->parent == n);			height_change = replace->parent->left ? 0 : -1;			d_balance     = -1;			to_balance    = replace->parent;			replace->parent->right = replace->right;		}		if (to_balance == n) {			to_balance = replace;		}		if (replace->right) {			replace->right->parent = replace->parent;		}		replace->balance = n->balance;		// Swap node to delete with replace		if (pp) {			*pp = replace;		} else {			assert(t->root == n);			t->root = replace;		}		replace->parent = n->parent;		replace->left   = n->left;		n->left->parent = replace;		replace->right  = n->right;		if (n->right) {			n->right->parent = replace;		}		assert(!replace->parent		       || replace->parent->left == replace		       || replace->parent->right == replace);	}	// Rebalance starting at to_balance upwards.	for (ZixTreeNode* i = to_balance; i; i = i->parent) {		i->balance += d_balance;		if (d_balance == 0 || i->balance == -1 || i->balance == 1) {			break;		}		assert(i != n);		i = zix_tree_rebalance(t, i, &height_change);		if (i->balance == 0) {			height_change = -1;		}		if (i->parent) {			if (i == i->parent->left) {				d_balance = height_change * -1;			} else {				assert(i == i->parent->right);				d_balance = height_change;			}		}	}	DUMP(t);	if (t->destroy) {		t->destroy(n->data);	}	free(n);	--t->size;#ifdef ZIX_TREE_VERIFY	if (!verify(t, t->root)) {		return ZIX_STATUS_ERROR;	}#endif	return ZIX_STATUS_SUCCESS;}
开发者ID:Cactuslegs,项目名称:audacity-of-nope,代码行数:101,


示例20: x87_f2xm1

/* st0 = (2^st0)-1 * * Restrictions: -1.0 <= st0 <= 1.0 */void x87_f2xm1( struct x86_function *p ){   DUMP();   emit_2ub(p, 0xd9, 0xf0);}
开发者ID:CPFDSoftware-Tony,项目名称:gmv,代码行数:9,


示例21: caml_context_split_r

CAMLprim value caml_context_split_r(CAML_R, value thread_no_as_value, value function){#if defined(HAS_MULTICONTEXT) //&& defined(NATIVE_CODE)  //DUMPROOTS("splitting: before GC-protecting locals");  CAMLparam1(function);  //CAMLlocal2(result, open_channels);  CAMLlocal5(result, open_channels, res, tail, chan);  //DUMPROOTS("splitting: after GC-protecting locals");  int can_split = caml_can_split_r(ctx);  if (! can_split)    caml_raise_cannot_split_r(ctx);  int thread_no = Int_val(thread_no_as_value);  caml_global_context **new_contexts = caml_stat_alloc(sizeof(caml_global_context*) * thread_no);  char *blob;  sem_t semaphore;  int i;  caml_initialize_semaphore(&semaphore, 0);  /* CAMLparam0(); CAMLlocal1(open_channels); */  /* Make sure that the currently-existing channels stay alive until     after deserialization; we can't keep reference counts within the     blob, so we pin all alive channels by keeping this list alive: *//* //if(0){//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! *//*   struct channel *channel; *//*   struct channel **channels; *//*   int channel_no = 0; *//*   caml_acquire_global_lock(); *//*   for (channel = caml_all_opened_channels; *//*        channel != NULL; *//*        channel = channel->next) *//*     channel_no ++; *//*   channels = caml_stat_alloc(sizeof(struct channel*) * channel_no); *//*   for (i = 0, channel = caml_all_opened_channels; *//*        channel != NULL; *//*        i ++, channel = channel->next){ *//*     channels[i] = channel; *//*     DUMP("split-pinning channel %p, with fd %i, refcount %i->%i", channel, (int)channel->fd, channel->refcount, channel->refcount + 1); *//*     channel->refcount ++; *//*   } *//*   caml_release_global_lock(); */  //open_channels = caml_ml_all_channels_list_r(ctx); // !!!!!!!!!!!!!!!!!!!! This can occasionally cause crashes related to channel picounts.  I certainly messed up something in io.c. //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//}//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!/* //EXPERIMENTAL: BEGIN *//* { *//*   struct channel * channel; *//*   res = Val_emptylist; *//* caml_acquire_global_lock(); *//*  int ii, channel_index; *//*  for(ii = 0; ii < 100; ii ++){ // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! *//*   for (channel_index = 0, channel = caml_all_opened_channels; *//*        channel != NULL; *//*        channel = channel->next, channel_index ++) *//*     //* Testing channel->fd >= 0 looks unnecessary, as *//*        caml_ml_close_channel changes max when setting fd to -1. *// *//*     { *//*       DUMP("round %i, channel_index %i", ii, channel_index); *//*       // !!!!!!!!!!!!! BEGIN *//*       //* chan = *// caml_alloc_channel_r (ctx, channel); *//*       // !!!!!!!!!!!!! END *//*       chan = Val_unit;//caml_alloc_channel_r (ctx, channel); // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! *//*       tail = res; *//*       res = caml_alloc_small_r (ctx, 2, 0); *//*       Field (res, 0) = chan; *//*       Field (res, 1) = tail; *//*     } *//*   DUMP("End of round %i: there are %i channels alive", ii, channel_index); *//*   DUMP("Before GC'ing"); *//*   caml_gc_compaction_r(ctx, Val_unit); //[email
C++ DUNGEON_MODE函数代码示例
C++ DUK_UNREF函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。