首页 > 其他分享 >TEMP_FAILURE_RETRY 宏

TEMP_FAILURE_RETRY 宏

时间:2023-05-23 16:32:28浏览次数:42  
标签:RETRY TEMP FAILURE value failure rc


The GNU library provides a convenient way to retry a call after a temporary failure, with the macro TEMP_FAILURE_RETRY: — Macro: TEMP_FAILURE_RETRY  (expression)

This macro evaluates expression once, and examines its value as type long int. If the value equals -1, that indicates a failure and errno should be set to show what kind of failure. If it fails and reports error code EINTR, TEMP_FAILURE_RETRY evaluates it again, and over and over until the result is not a temporary failure. The value returned by TEMP_FAILURE_RETRY is whatever value expression produced.

/* Used to retry syscalls that can return EINTR. */
 #define TEMP_FAILURE_RETRY(exp) ({         \
     typeof (exp) _rc;                      \
     do {                                   \
         _rc = (exp);                       \
     } while (_rc == -1 && errno == EINTR); \
     _rc; })

标签:RETRY,TEMP,FAILURE,value,failure,rc
From: https://blog.51cto.com/u_9420214/6333330

相关文章

  • template
    templatedemos(......
  • Weakly Supervised Temporal Action Localization via Representative Snippet Knowle
    0.前言相关资料:arxivgithub论文解读论文基本信息:领域:弱监督时序动作定位发表时间:CVPR2022(2022.3.14)1.针对的问题许多现有的方法试图生成伪标签来弥补分类和定位之间的差异,但通常只使用有限的上下文信息,即每个片段内的信息,来生成伪标签。2.主......
  • resttemplate封装类方便调用
    1publicclassRnrFpRestTemplateUtils{23privatestaticfinalLoggerLOGGER=LoggerFactory.getLogger(RnrFpRestTemplateUtils.class);456/**7*Description:post请求Response泛型8*<br/>9*CreateDate......
  • mapperTemp
    @Insert("INSERTINTOcoxisolate.instanceinfo(instance_id,app_name,create_time,update_time,status,readiness_flag,isolate_flag,reason)"+"VALUES(#{instanceId},#{appName},CURRENT_TIMESTAMP,CURRENT_TIMESTAMP,#{status},#{re......
  • 2. Equalibrium and Temperature
    什么是Equalibrium(state)Equalibirumstate可以说是系统演化的一个目标,当一个系统经过长时间的演化后处于一个与初始条件无关,且其一些宏观性质不随时间变化的状态时,我们就说系统进入了equalibriumstate.如何描述Equalibrium实际上通过一组宏观上测量的量就可以描述equlibri......
  • 【vue】div标签和template标签使用区别
       ......
  • template
    templatedemos(......
  • Vue.js学习记录之在元素与template中使用v-if指令实例(转贴)
    语法比较简单,直接上代码:<!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head> <title></title> <scriptsrc="https://cdn.bootcss.com/vue/2.2.2/vue.......
  • template
    templatedemos(......
  • 水晶报表 加载报错 An error has occurred while attempting to load the Crystal Rep
    源错误:CrystalReportsAnerrorhasoccurredwhileattemptingtoloadtheCrystalReportsruntime.EithertheCrystalReportsregistrykeypermissionsareinsufficientortheCrystalReportsruntimeisnotinstalledcorrectly.Pleaseinstalltheappropriate......