• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ end_write函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: begin_write

ZEND_API zval *_zend_ts_hash_index_add_or_update(TsHashTable *ht, zend_ulong h, zval *pData, int flag ZEND_FILE_LINE_DC)
{
	zval *retval;

	begin_write(ht);
	retval = _zend_hash_index_add_or_update(TS_HASH(ht), h, pData, flag ZEND_FILE_LINE_RELAY_CC);
	end_write(ht);

	return retval;
}
开发者ID:AxiosCros,项目名称:php-src,代码行数:10,代码来源:zend_ts_hash.c


示例2: zend_ts_hash_del

ZEND_API int zend_ts_hash_del(TsHashTable *ht, zend_string *key)
{
	int retval;

	begin_write(ht);
	retval = zend_hash_del(TS_HASH(ht), key);
	end_write(ht);

	return retval;
}
开发者ID:AxiosCros,项目名称:php-src,代码行数:10,代码来源:zend_ts_hash.c


示例3: zend_ts_hash_apply_with_arguments

ZEND_API void zend_ts_hash_apply_with_arguments(TsHashTable *ht, apply_func_args_t apply_func, int num_args, ...)
{
	va_list args;

	va_start(args, num_args);
	begin_write(ht);
	zend_hash_apply_with_arguments(TS_HASH(ht), apply_func, num_args, args);
	end_write(ht);
	va_end(args);
}
开发者ID:AxiosCros,项目名称:php-src,代码行数:10,代码来源:zend_ts_hash.c


示例4: zend_ts_hash_rehash

ZEND_API int zend_ts_hash_rehash(TsHashTable *ht)
{
	int retval;

	begin_write(ht);
	retval = zend_hash_rehash(TS_HASH(ht));
	end_write(ht);

	return retval;
}
开发者ID:AxiosCros,项目名称:php-src,代码行数:10,代码来源:zend_ts_hash.c


示例5: zend_ts_hash_index_del

ZEND_API int zend_ts_hash_index_del(TsHashTable *ht, zend_ulong h)
{
	int retval;

	begin_write(ht);
	retval = zend_hash_index_del(TS_HASH(ht), h);
	end_write(ht);

	return retval;
}
开发者ID:AxiosCros,项目名称:php-src,代码行数:10,代码来源:zend_ts_hash.c


示例6: zend_ts_hash_sort

ZEND_API int zend_ts_hash_sort(TsHashTable *ht, sort_func_t sort_func, compare_func_t compare_func, int renumber)
{
	int retval;

	begin_write(ht);
	retval = zend_hash_sort_ex(TS_HASH(ht), sort_func, compare_func, renumber);
	end_write(ht);

	return retval;
}
开发者ID:AxiosCros,项目名称:php-src,代码行数:10,代码来源:zend_ts_hash.c


示例7: _zend_ts_hash_index_update_or_next_insert

ZEND_API int _zend_ts_hash_index_update_or_next_insert(TsHashTable *ht, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC)
{
	int retval;

	begin_write(ht);
	retval = _zend_hash_index_update_or_next_insert(TS_HASH(ht), h, pData, nDataSize, pDest, flag ZEND_FILE_LINE_RELAY_CC);
	end_write(ht);

	return retval;
}
开发者ID:nishisan,项目名称:scripts,代码行数:10,代码来源:zend_ts_hash.c


示例8: zend_ts_hash_add_empty_element

ZEND_API int zend_ts_hash_add_empty_element(TsHashTable *ht, char *arKey, uint nKeyLength)
{
	int retval;

	begin_write(ht);
	retval = zend_hash_add_empty_element(TS_HASH(ht), arKey, nKeyLength);
	end_write(ht);

	return retval;
}
开发者ID:nishisan,项目名称:scripts,代码行数:10,代码来源:zend_ts_hash.c


示例9: _zend_ts_hash_add_or_update

ZEND_API int _zend_ts_hash_add_or_update(TsHashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC)
{
	int retval;

	begin_write(ht);
	retval = _zend_hash_add_or_update(TS_HASH(ht), arKey, nKeyLength, pData, nDataSize, pDest, flag ZEND_FILE_LINE_RELAY_CC);
	end_write(ht);

	return retval;
}
开发者ID:PHPFORMEEGO,项目名称:PHPCore,代码行数:10,代码来源:zend_ts_hash.c


示例10: hot_ens_Join

/* Join a group.  The group context is returned in *contextp.  
 */
hot_err_t hot_ens_Join(
    hot_ens_JoinOps_t *jops,
    hot_context_t *contextp	/*OUT*/ 
) {
    hot_err_t err = HOT_OK ;
    hot_context_t s ;

    /* Initialize global state if not done so already.
     */
    if (!g.initialized) {
	err = hot_ens_Init(jops->outboard, jops->argv); 
	if (err != HOT_OK)
	    return err;
    }

    begin_write(); {    
	begin_critical(); {    
	    /* Allocate a new group context 
	     * Initialize the group record.
	     */
	    s = alloc_context();
	    s->joining = 1 ;
	    s->leaving = 0 ;
	    s->conf = jops->conf;
	    s->env = jops->env;
	    s->view = NULL ;
	    *contextp = s ;
	} end_critical();
	
	/* Write the downcall.
	 */
  	write_hdr(s,DN_JOIN);
	write_int(jops->heartbeat_rate);
	write_string(jops->transports);
	write_string(jops->protocol);
	write_string(jops->group_name);
	write_string(jops->properties);
	write_bool(jops->use_properties);
	write_bool(jops->groupd);
	write_string(jops->params);
	write_bool(jops->client);
	write_bool(jops->debug);

	if (jops->endpt.name[0] != 0x0) {
	    hot_sys_Warning("HOT_OUTBOARD does not support 'endpt' in join ops") ;
	    jops->endpt.name[0] = 0x0;
	}
	write_string(jops->princ);
	write_string(jops->key);
	write_bool(jops->secure);

    } end_write();

    return HOT_OK;
}
开发者ID:4og,项目名称:avango,代码行数:57,代码来源:hot_outboard_c.c


示例11: zend_ts_hash_destroy

ZEND_API void zend_ts_hash_destroy(TsHashTable *ht)
{
	begin_write(ht);
	zend_hash_destroy(TS_HASH(ht));
	end_write(ht);

#ifdef ZTS
	tsrm_mutex_free(ht->mx_reader);
	tsrm_mutex_free(ht->mx_writer);
#endif
}
开发者ID:2yeslater,项目名称:php_threading,代码行数:11,代码来源:zend_ts_hash.c


示例12: hot_ens_XferDone

/* Inform Ensemble that the state-transfer is complete. 
 */
hot_err_t hot_ens_XferDone(
    hot_context_t s
) {
    begin_write(); {
	begin_critical(); {
	    if (s->leaving) {
		hot_sys_Panic("hot_ens_XferDone: member is leaving") ;
	    }
	} end_critical();
	write_hdr(s,DN_XFERDONE);
    } end_write();
    return HOT_OK;
}
开发者ID:4og,项目名称:avango,代码行数:15,代码来源:hot_outboard_c.c


示例13: hot_ens_RequestNewView

/* Request a new view to be installed.
 */
hot_err_t hot_ens_RequestNewView(
    hot_context_t s
) {
    begin_write(); {
	begin_critical(); {
	    if (s->leaving) {
		hot_sys_Panic("hot_ens_RequestNewView: member is leaving") ;
	    }
	} end_critical();
	write_hdr(s,DN_PROMPT);
    } end_write();
    return HOT_OK;
}
开发者ID:4og,项目名称:avango,代码行数:15,代码来源:hot_outboard_c.c


示例14: hot_ens_Rekey

/* Request a Rekey operation.
 */
hot_err_t hot_ens_Rekey(
    hot_context_t s
) {
    begin_write(); {
	begin_critical(); {
	    if (s->leaving) {
		hot_sys_Panic("hot_ens_Rekey: member is leaving") ;
	    }
	} end_critical();
	write_hdr(s,DN_REKEY);
    } end_write();
    return HOT_OK;
}
开发者ID:4og,项目名称:avango,代码行数:15,代码来源:hot_outboard_c.c


示例15: __TBB_ASSERT

// Releases the reader_writer_lock
void reader_writer_lock::unlock() {
    if( my_current_writer!=tbb_thread::id() ) {
        // A writer owns the lock
        __TBB_ASSERT(is_current_writer(), "caller of reader_writer_lock::unlock() does not own the lock.");
        __TBB_ASSERT(writer_head, NULL);
        __TBB_ASSERT(writer_head->status==active, NULL);
        scoped_lock *a_writer_lock = writer_head;
        end_write(a_writer_lock);
        __TBB_ASSERT(a_writer_lock != writer_head, "Internal error: About to turn writer_head into dangling reference.");
        delete a_writer_lock;
    } else {
        end_read();
    }
}
开发者ID:00liujj,项目名称:dealii,代码行数:15,代码来源:reader_writer_lock.cpp


示例16: outb_atexit

static void outb_atexit(void) {
  char eof = EOF;

  /* Send a kill signal to the child.
   */
  kill(cid, SIGKILL);
  waitpid(cid, NULL, 0);
  
  /* In case signal fails, write EOF to the pipe.
   */
  begin_write() ;
  do_write(&eof, 4);
  end_write() ;
}
开发者ID:4og,项目名称:avango,代码行数:14,代码来源:hot_outboard_c.c


示例17: zodiac_spew

/* zodiac_spew - Takes a message type, an array of data words, and a length
 * for the array, and prepends a 5 word header (including checksum).
 * The data words are expected to be checksummed.
 */
static ssize_t zodiac_spew(struct gps_device_t *session, unsigned short type,
			   unsigned short *dat, int dlen)
{
    struct header h;
    int i;
    char buf[BUFSIZ];

    h.sync = 0x81ff;
    h.id = (unsigned short)type;
    h.ndata = (unsigned short)(dlen - 1);
    h.flags = 0;
    h.csum = zodiac_checksum((unsigned short *)&h, 4);

    if (!BAD_SOCKET(session->gpsdata.gps_fd)) {
	size_t hlen, datlen;
	hlen = sizeof(h);
	datlen = sizeof(unsigned short) * dlen;
	if (end_write(session->gpsdata.gps_fd, &h, hlen) != (ssize_t) hlen ||
	    end_write(session->gpsdata.gps_fd, dat,
		      datlen) != (ssize_t) datlen) {
	    gpsd_log(&session->context->errout, LOG_RAW,
		     "Reconfigure write failed\n");
	    return -1;
	}
    }

    (void)snprintf(buf, sizeof(buf),
		   "%04x %04x %04x %04x %04x",
		   h.sync, h.id, h.ndata, h.flags, h.csum);
    for (i = 0; i < dlen; i++)
	str_appendf(buf, sizeof(buf), " %04x", dat[i]);

    gpsd_log(&session->context->errout, LOG_RAW,
	     "Sent Zodiac packet: %s\n", buf);

    return 0;
}
开发者ID:sensarliar,项目名称:zfcs_arago_fs,代码行数:41,代码来源:driver_zodiac.c


示例18: list_remove

struct linked_list* list_remove(struct linked_list_head *list, int val) {
  struct linked_list **p, *ret=NULL;
  begin_write(list->sync);
  p=&list->head;
  while (*p) {
    if ((*p)->nb==val) {
      ret=*p;
      *p=(*p)->next;
      break;
    }
    p=&(*p)->next;
  }
  end_write(list->sync);
  return ret;
}
开发者ID:horak90,项目名称:OS-Sync,代码行数:15,代码来源:linked_list.c


示例19: remove_element

struct linked_list* remove_element(struct linked_list_head *list, int val) {
	struct linked_list **p, *ret = NULL;
	begin_write(&list->sync);
	sleep(rand()%3 + 1);
	p = &list->head;
	while((*p) != NULL) {
		if ((*p)->nb == val) {
			ret = *p;
			*p = (*p)->next;
			break;
		}
		p = &(*p)->next;
	}
	end_write(&list->sync);
	return ret;
}
开发者ID:LilyOfTheWest,项目名称:M1-Info,代码行数:16,代码来源:exo2_2.c


示例20: hot_ens_Suspect

/* Report group members as failure-suspected.
 * 
 * NB:  In the initial implementation, this downcall will not be supported.
 *      (if invoked, an exeption will be raised by OCAML).
 */
hot_err_t hot_ens_Suspect(
    hot_context_t s,
    hot_endpt_t *suspects, 
    int nsuspects
) {
    begin_write(); {
	begin_critical(); {
	    if (s->leaving) {
		hot_sys_Panic("hot_ens_Suspect: member is leaving") ;
	    }
	} end_critical();
	write_hdr(s,DN_SUSPECT);
	write_endpList(nsuspects, suspects);
    } end_write();
    return HOT_OK;
}
开发者ID:4og,项目名称:avango,代码行数:21,代码来源:hot_outboard_c.c



注:本文中的end_write函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ endacq函数代码示例发布时间:2022-05-30
下一篇:
C++ end_update函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap