是否可用的编译器提供C11“_Atomic'关键字及其相关头”stdatomic.h“的实现? [英] Does an available compiler provide an implementation of the C11 '_Atomic' keyword and its related header 'stdatomic.h'?

查看:1350
本文介绍了是否可用的编译器提供C11“_Atomic'关键字及其相关头”stdatomic.h“的实现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道C11标准只有一个月大,但 _Atomic 草案老得多。我也知道GCC编译器,使实施提前标准等特点成为正式批准认真努力。但即使的支持还没有准备好黄金时间。

I know the C11 standard is only a month old, but the drafts for _Atomic are much older. I also know the GCC compiler makes a serious effort implementing such features in advance of the standard becoming officially approved. but even there the support is not yet ready for prime-time.

不过,我有兴趣在其他的编译器,以及:Visual Studio中,或者嵌入编译器CQ。环境。有没有人编译器供应商摩拳擦掌提供这种支持?任何链接都欢迎。

However, I'd be interested in other compilers as well: Visual Studio, or embedded compilers cq. environments. Is anyone compiler provider gearing up to provide such support? Any links are welcome.

我问,因为我在汽车嵌入式开发工作,我想知道我是否应该进入这个方向我自己。到现在为止,大多数环境中(如AUTOSAR或Vector操作系统支持)一直提供本土的解决方案,为此,新标准现在提供特定的语法和语义,而且只要编译器作者不C11的方向移动,这将仍然是唯一真正的解决方案。

I'm asking, because I'm working in automotive embedded development, and I'm wondering if I should move into that direction myself. Until now, most environments (like AutoSAR or Vector OS support) have been providing home-grown solutions, for which the new standard now provides specific syntax and semantics, and as long as compiler authors do not move in the direction of C11, this will remain the only real solution.

推荐答案

我觉得对于关键字本身支持将需要一定的时间,我还没有看到的东西呢。什么涉及库支持(支持功能),已经有更多的。特别是我知道,原子操作实现通用功能的gcc __同步_... 整数类型大部分的平台。

I think support for the keyword itself will take some time, I haven't seen something yet. For what concerns the library support (support functions) there is already more. In particular I know of gcc that implements generic functions for atomic operations __sync_... on integer types for most of the platforms.

我目前正在为C11 P99 合规层上。螺纹部分(对POSIX线程的顶部)已经存在,原子能公司(使用gcc的原语)的即将落成。这将是一个通用实现通过了实现的型通用 原子_... 是在标准预见的功能。

I am currently working on a compliance layer for P99 for C11. The thread part (on top of POSIX threads) is already there, atomics (using the gcc primitives) are soon to be completed. This will be a generic implementation supporting atomics for all base types via macros that implement the type generic atomic_... functions that are foreseen in the standard.

这几乎是在那里,您可以查看该网站的P99第一个版本,但我还需要几天的时间来完成它。

It is almost there, you can view a first version on the P99 site, but I'll still need some days to finish it.

这篇关于是否可用的编译器提供C11“_Atomic'关键字及其相关头”stdatomic.h“的实现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆