&是什么QUOT;>> = QUOT;在Linux内核源代码code是什么意思? [英] What does ">>=" mean in Linux kernel source code?

查看:118
本文介绍了&是什么QUOT;>> = QUOT;在Linux内核源代码code是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Linux内核源代码code,我在下面找到code:

in Linux kernel source code, I find below code:

    h++;
    pending >>= 1;

有__ do_softirq(无效)的一部分。但是,什么是>> =是什么意思?为什么不是>>我还记得吗?
谢谢!

It is part of __do_softirq(void). But what does ">>=" mean? Why isn't it ">>" as I remember? Thanks!

推荐答案

它根本

pending = pending >>1;

在总之它除以2 unsigned int类型。

In short it divides by 2 an unsigned int.

这是同样的构造比 + = / =

这不仅仅是未决>> 1 你还记得,因为这不会存储在变量移位操作的结果。

It's not just pending >>1 as you remember because that wouldn't store the result of the shift operation in the variable.

这篇关于&是什么QUOT;>> = QUOT;在Linux内核源代码code是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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