BUILD_BUG_ON:只有条件condition为0时可编译,但不返回值,否则编译器报错。 BUILD_BUG_ON_ZERO:只有条件e为0时返回0,否则编译器报错。 当我们调试完代码后,建议关闭这个宏,可以使用另一个宏定义来使能/关闭BUILD_BUG_ON 宏。
atomic_set(&priv->queue_stop_count[i],0);/* reset to 0 to enable all the queue first */priv->txq_ctx_active_msk =0;/* map qos queues to fifos one-to-one */BUILD_BUG_ON(ARRAY_SIZE(iwlagn_default_queue_to_tx_fifo) !=10);for(i =0; i < ARRAY_SIZE(iwlagn_default_queue_...
1#defineBUILD_BUG_ON_ZERO(e) (sizeof(struct{int : -!!(e);}))2#defineBUILD_BUG_ON_NULL(e) ((void*)sizeof(struct{int : -!!(e);}))34#defineBUILD_BUG_ON(condition) ((void)BUILD_BUG_ON_ZERO(condition))56#defineMAYBE_BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2 * !!
aren't permitted). */#defineBUILD_BUG_ON_ZERO(e)(sizeof(struct{int:-!!(e);}))#defineBUILD_BUG_ON_NULL(e)((void*)sizeof(struct{int:-!!(e);})) 分析第一个,它表示的是:检查表达式e是否为0,为0编译通过且返回0;如果不为0,则编译不通过。 可能从这个宏的名字上看可能容易理解错,或者改...
BUILD_BUG_ON(EPOLL_CLOEXEC != O_CLOEXEC); ... 跟踪到宏定义可以看到,这个妖怪的真面目。 #defineBUILD_BUG_ON(condition) ((void)BUILD_BUG_ON_ZERO(condition))...#defineBUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
+ BUILD_BUG_ON(SHADOW_STACK_SIZE % sizeof(long)); + /* * We must make sure the ret_stack is tested before we read * anything else. @@ -326,6 +328,8 @@ ftrace_graph_get_ret_stack(struct task_struct *task, int idx)
Add standalone includes for BUG_ON and BUILD_BUG_ON to avoid build failure after linux-next include refactoring. Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Chris Wilson <chris.p.wilson@linux.intel.com> Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Rodrigo...
- WARN_ON_ONCE(ARRAY_SIZE(sdp->srcu_lock_count) != + BUILD_BUG_ON(ARRAY_SIZE(sdp->srcu_lock_count) != ARRAY_SIZE(sdp->srcu_unlock_count)); for_each_possible_cpu(cpu) { sdp = per_cpu_ptr(ssp->sda, cpu); @@ -186,7 +186,7 @@ static bool init_srcu_struct_nodes(struct sr...
BUILD_BUG_ON(scale_bits + value_bits >= sizeof(uint) * 8); @@ -349,6 +365,23 @@ static __always_inline uint unpack_uint_opt(struct bit_creek *src, return _unpack_uint_opt(src, value_bits, scale_bits, def); } /** * pack_uint_opt - Write an optional packed uint value to...
build32.bat build bug on Win2000 Subscribe More actions Intel_C_Intel Employee 12-08-2006 03:27 AM 287 Views in build32.batset include_list=...too long on Win2000, the Win2000 does not support command line >2KTranslate0 ...