当前位置: 首页>>代码示例>>C++>>正文


C++ GlobusXIOName函数代码示例

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


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

示例1: globus_xio_stack_init

/************************************************************************
 *                  stack functions
 ***********************************************************************/
globus_result_t
globus_xio_stack_init(
    globus_xio_stack_t *                stack,
    globus_xio_attr_t                   stack_attr)
{
    globus_i_xio_stack_t *              xio_stack;
    GlobusXIOName(globus_xio_stack_init);

    GlobusXIODebugEnter();
    
    if(stack == NULL)
    {
        GlobusXIODebugExitWithError();
        return GlobusXIOErrorParameter("stack");
    }

    xio_stack = globus_malloc(sizeof(globus_i_xio_stack_t));
    memset(xio_stack, '\0', sizeof(globus_i_xio_stack_t));

    *stack = xio_stack;

    GlobusXIODebugExit();

    return GLOBUS_SUCCESS;
}
开发者ID:bbockelm,项目名称:globus-toolkit,代码行数:28,代码来源:globus_xio_attr.c

示例2: globus_xio_string_cntl_formated_int

globus_result_t
globus_xio_string_cntl_formated_int(
    void *                              attr,
    const char *                        key,
    const char *                        val,
    int                                 cmd,
    globus_xio_driver_attr_cntl_t       cntl_func)
{
    int                                 sc;
    int                                 i;
    globus_off_t                        o;
    globus_result_t                     result = GLOBUS_SUCCESS;
    GlobusXIOName(globus_xio_string_cntl_formated_int);

    GlobusXIODebugEnter();

    sc = globus_xio_string_cntl_tb_kmgint(val, &o);
    if(sc != 0)
    {
        result = GlobusXIOErrorParse(val);
    }
    else
    {
        i = (int) o;
        result = globus_xio_string_cntl_bouncer(cntl_func, attr, cmd, i);
    }
    GlobusXIODebugExit();
    return result;
}
开发者ID:bbockelm,项目名称:globus-toolkit,代码行数:29,代码来源:globus_xio_attr.c

示例3: globus_xio_string_cntl_float

globus_result_t
globus_xio_string_cntl_float(
    void *                              attr,
    const char *                        key,
    const char *                        val,
    int                                 cmd,
    globus_xio_driver_attr_cntl_t       cntl_func)
{
    int                                 sc;
    float                               f;
    globus_result_t                     result = GLOBUS_SUCCESS;
    GlobusXIOName(globus_xio_string_cntl_float);

    GlobusXIODebugEnter();

    sc = sscanf(val, "%f", &f);
    if(sc != 1)
    {
        result = GlobusXIOErrorParse(val);
    }
    else
    {
        result = globus_xio_string_cntl_bouncer(cntl_func, attr, cmd, f);
    }
    GlobusXIODebugExit();
    return result;
}
开发者ID:bbockelm,项目名称:globus-toolkit,代码行数:27,代码来源:globus_xio_attr.c

示例4: globus_l_xio_bounce_init

static globus_result_t
globus_l_xio_bounce_init(
    globus_xio_driver_t *               out_driver)
{
    globus_xio_driver_t                 driver;
    globus_result_t                     res;
    GlobusXIOName(globus_l_xio_bounce_init);

    GlobusXIOTestDebugInternalEnter();
    res = globus_xio_driver_init(&driver, "bounce", NULL);
    if(res != GLOBUS_SUCCESS)
    {
        return res;
    }

    globus_xio_driver_set_transform(
        driver,
        globus_l_xio_bounce_open,
        globus_l_xio_bounce_close,
        globus_l_xio_bounce_read,
        globus_l_xio_bounce_write,
        globus_l_xio_bounce_cntl,
        NULL);

    *out_driver = driver;

    GlobusXIOTestDebugInternalExit();
    return GLOBUS_SUCCESS;
}
开发者ID:bbockelm,项目名称:globus-toolkit,代码行数:29,代码来源:globus_xio_bounce.c

示例5: globus_xio_stack_destroy

globus_result_t
globus_xio_stack_destroy(
    globus_xio_stack_t                  stack)
{
    globus_result_t                     res;
    GlobusXIOName(globus_xio_stack_destroy);

    GlobusXIODebugEnter();
    
    if(stack == NULL)
    {
        res = GlobusXIOErrorParameter("stack");
        goto err;
    }

    globus_list_free(stack->driver_stack);
    globus_free(stack);

    GlobusXIODebugExit();
    return GLOBUS_SUCCESS;

  err:

    GlobusXIODebugExitWithError();
    return res;
}
开发者ID:bbockelm,项目名称:globus-toolkit,代码行数:26,代码来源:globus_xio_attr.c

示例6: bounce_cb

void
bounce_cb(
    globus_xio_operation_t              op,
    globus_result_t                     result,
    void *                              user_arg)
{
    bounce_info_t *                     info;
    globus_result_t                     res;
    GlobusXIOName(bounce_cb);

    GlobusXIOTestDebugInternalEnter();
    info = (bounce_info_t *) user_arg;
    info->res = result;
    info->wait_for = 1024;
    info->iovec = &info->tmp_iovec;
    info->iovec->iov_base = (globus_byte_t *) 0x100;
    info->iovec->iov_len = 1024;
    info->iovec_count = 1;

    if(result != GLOBUS_SUCCESS)
    {
        GlobusXIOTestDebugPrintf(GLOBUS_XIO_TEST_DEBUG_STATE,
            ("[%s] : result != Success\n", _xio_name));
        info->next_op = TEST_FINISH;
    }

    res = test_bounce_next_op(info, op);
    if(res != GLOBUS_SUCCESS)
    {
        info->res = res;
        test_bounce_finish_op(info, op);
    }
    GlobusXIOTestDebugInternalExit();
}
开发者ID:bbockelm,项目名称:globus-toolkit,代码行数:34,代码来源:globus_xio_bounce.c

示例7: bounce_data_cb

void
bounce_data_cb(
    globus_xio_operation_t              op,
    globus_result_t                     result,
    globus_size_t                       nbytes,
    void *                              user_arg)
{
    bounce_info_t *                     info;
    globus_result_t                     res;
    GlobusXIOName(bounce_data_cb);

    GlobusXIOTestDebugInternalEnter();
    info = (bounce_info_t *) user_arg;
    info->res = result;
    info->nbytes = nbytes;

    if(result != GLOBUS_SUCCESS)
    {
        GlobusXIOTestDebugPrintf(GLOBUS_XIO_TEST_DEBUG_STATE,
            ("[%s] : result != Success\n", _xio_name));
        info->next_op = TEST_FINISH;
    }

    res = test_bounce_next_op(info, op);
    if(res != GLOBUS_SUCCESS)
    {
        info->res = res;
        test_bounce_finish_op(info, op);
    }
    GlobusXIOTestDebugInternalExit();
}
开发者ID:bbockelm,项目名称:globus-toolkit,代码行数:31,代码来源:globus_xio_bounce.c

示例8: globus_l_xio_popen_init_child_pipe

static
globus_result_t
globus_l_xio_popen_init_child_pipe(
    int                                 fd,
    globus_xio_system_file_handle_t *   out_system)
{
    globus_result_t                     result;
    GlobusXIOName(globus_l_xio_popen_init_child_pipe);

#ifndef WIN32
    fcntl(fd, F_SETFD, FD_CLOEXEC);
#endif

    result = globus_xio_system_file_init(out_system, fd);
    if(result != GLOBUS_SUCCESS)
    {
        result = GlobusXIOErrorWrapFailed(
            "globus_xio_system_file_init", result);
        goto error_init;
    }

    return GLOBUS_SUCCESS;

error_init:

    return result;
}
开发者ID:bbockelm,项目名称:globus-toolkit,代码行数:27,代码来源:globus_xio_popen_driver.c

示例9: globus_l_xio_popen_system_write_cb

static
void
globus_l_xio_popen_system_write_cb(
    globus_result_t                     result,
    globus_size_t                       nbytes,
    void *                              user_arg)
{
    globus_xio_operation_t              op;
    xio_l_popen_handle_t *              handle;
    GlobusXIOName(globus_l_xio_popen_system_write_cb);
    
    GlobusXIOPOpenDebugEnter();
    
    op = (globus_xio_operation_t) user_arg;
    
    handle = (xio_l_popen_handle_t *) 
        globus_xio_operation_get_driver_specific(op);
        
    handle->canceled = globus_xio_operation_is_canceled(op);

    globus_l_xio_popen_update_position(
        handle,
        nbytes,
        SEEK_CUR);
        
    globus_xio_driver_finished_write(op, result, nbytes);
    
    GlobusXIOPOpenDebugExit();
}
开发者ID:bbockelm,项目名称:globus-toolkit,代码行数:29,代码来源:globus_xio_popen_driver.c

示例10: globus_l_xio_popen_handle_init

static
globus_result_t
globus_l_xio_popen_handle_init(
    xio_l_popen_handle_t **             handle)
{
    globus_result_t                     result;
    GlobusXIOName(globus_l_xio_popen_handle_init);
    
    GlobusXIOPOpenDebugEnter();
    
    *handle = (xio_l_popen_handle_t *)
        globus_calloc(1, sizeof(xio_l_popen_handle_t));
    if(!*handle)
    {
        result = GlobusXIOErrorMemory("handle");
        goto error_handle;
    }
    
    globus_mutex_init(&(*handle)->lock, NULL);
    
    GlobusXIOPOpenDebugExit();
    return GLOBUS_SUCCESS;

error_handle:
    GlobusXIOPOpenDebugExitWithError();
    return result;    
}
开发者ID:bbockelm,项目名称:globus-toolkit,代码行数:27,代码来源:globus_xio_popen_driver.c

示例11: globus_l_xio_popen_activate

static
int
globus_l_xio_popen_activate(void)
{
    int                                 rc;
    
    GlobusXIOName(globus_l_xio_popen_activate);
    
    GlobusDebugInit(GLOBUS_XIO_POPEN, TRACE INFO);
    
    GlobusXIOPOpenDebugEnter();
    
    rc = globus_module_activate(GLOBUS_XIO_SYSTEM_MODULE);
    if(rc != GLOBUS_SUCCESS)
    {
        goto error_activate;
    }
    
    GlobusXIORegisterDriver(popen);
    
    GlobusXIOPOpenDebugExit();
    return GLOBUS_SUCCESS;

error_activate:
    GlobusXIOPOpenDebugExitWithError();
    GlobusDebugDestroy(GLOBUS_XIO_POPEN);
    return rc;
}
开发者ID:bbockelm,项目名称:globus-toolkit,代码行数:28,代码来源:globus_xio_popen_driver.c

示例12: globus_i_xio_system_file_try_write

globus_result_t
globus_i_xio_system_file_try_write(
    globus_xio_system_file_t            handle,
    const globus_xio_iovec_t *          iov,
    int                                 iovc,
    globus_size_t *                     nbytes)
{
    globus_result_t                     result;
    GlobusXIOName(globus_i_xio_system_file_try_write);

    GlobusXIOSystemDebugEnter();

    if(iovc == 1)
    {
        result = globus_i_xio_system_try_write(
            handle, iov->iov_base, iov->iov_len, nbytes);
    }
    else
    {
        result = globus_i_xio_system_try_writev(handle, iov, iovc, nbytes);
    }

    GlobusXIOSystemDebugExit();
    return result;
}
开发者ID:eunsungc,项目名称:gt6-RAMSES_8_5,代码行数:25,代码来源:globus_i_xio_system_common.c

示例13: globus_l_xio_pipe_attr_init

static
globus_result_t
globus_l_xio_pipe_attr_init(
    void **                             out_attr)
{
    xio_l_pipe_attr_t *                 attr;
    globus_result_t                     result;
    GlobusXIOName(globus_l_xio_pipe_attr_init);

    GlobusXIOPipeDebugEnter();
    /*
     *  create a file attr structure and intialize its values
     */
    attr = (xio_l_pipe_attr_t *) globus_malloc(sizeof(xio_l_pipe_attr_t));
    if(!attr)
    {
        result = GlobusXIOErrorMemory("attr");
        goto error_attr;
    }

    memcpy(attr, &xio_l_pipe_attr_default, sizeof(xio_l_pipe_attr_t));
    *out_attr = attr;

    GlobusXIOPipeDebugExit();
    return GLOBUS_SUCCESS;

error_attr:
    GlobusXIOPipeDebugExitWithError();
    return result;
}
开发者ID:eunsungc,项目名称:gt6-RAMSES_8_5,代码行数:30,代码来源:globus_xio_pipe_driver.c

示例14: globus_l_xio_pipe_attr_copy

/*
 *  copy an attribute structure
 */
static
globus_result_t
globus_l_xio_pipe_attr_copy(
    void **                             dst,
    void *                              src)
{
    xio_l_pipe_attr_t *                 attr;
    xio_l_pipe_attr_t *                 src_attr;
    globus_result_t                     result;
    GlobusXIOName(globus_l_xio_pipe_attr_copy);

    GlobusXIOPipeDebugEnter();

    src_attr = (xio_l_pipe_attr_t *) src;
    attr = (xio_l_pipe_attr_t *) globus_malloc(sizeof(xio_l_pipe_attr_t));
    if(!attr)
    {
        result = GlobusXIOErrorMemory("attr");
        goto error_attr;
    }

    memcpy(attr, src_attr, sizeof(xio_l_pipe_attr_t));
    *dst = attr;

    GlobusXIOPipeDebugExit();
    return GLOBUS_SUCCESS;

error_attr:
    GlobusXIOPipeDebugExitWithError();
    return result;
}
开发者ID:eunsungc,项目名称:gt6-RAMSES_8_5,代码行数:34,代码来源:globus_xio_pipe_driver.c

示例15: globus_i_xio_http_header_info_copy

/**
 * Copy the contents of a header information structure.
 * @ingroup globus_i_xio_http_header_info
 *
 * All values associated with the @a src header information structure will
 * be copied to the @a dest one. If this function returns a failure, then the
 * @a dest structure should be considered uninitialized.
 *
 * @param dest
 *     Header information structure to initialize. This should not be
 *     initialized before this function is called, or memory may be leaked.
 * @param src
 *     Header information structure containing valid values.
 *
 * @retval GLOBUS_SUCCESS
 *     Structure successfully copied.
 * @retval GLOBUS_XIO_ERROR_MEMORY
 *     Copy failed due to memory constraints.
 */
globus_result_t
globus_i_xio_http_header_info_copy(
    globus_i_xio_http_header_info_t *   dest,
    const globus_i_xio_http_header_info_t *
                                        src)
{
    int                                 rc;
    globus_result_t                     result = GLOBUS_SUCCESS;

    GlobusXIOName(globus_i_xio_http_header_info_init);
    rc = globus_hashtable_copy(
            &dest->headers,
            (globus_hashtable_t *) &src->headers,
            globus_i_xio_http_header_copy);
    if (rc != GLOBUS_SUCCESS)
    {
        result = GlobusXIOErrorMemory("hashtable");

        goto error_exit;
    }

    dest->content_length = src->content_length;
    dest->transfer_encoding = src->transfer_encoding;
    dest->flags = src->flags;

    return result;

error_exit:
    return result;
}
开发者ID:bbockelm,项目名称:globus-toolkit,代码行数:49,代码来源:globus_xio_http_header_info.c


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