c - ((uint32_t *)arg) 是什么意思? (上下文如下)

标签 c driver

int alpharomeo_probe(struct tty_struct *tty, uint32_t *arg)
{

    ((uint32_t *)arg) = 0xdeadbeef;  // This line
         <more code>

}

最佳答案

0xDEADBEEF ("dead beef") is frequently used to indicate a software crash or deadlock in embedded systems. DEADBEEF was originally used to mark newly allocated areas of memory that had not yet been initialized -- when scanning a memory dump, it is easy to see the DEADBEEF. It is used by IBM RS/6000 systems, Mac OS on 32-bit PowerPC processors and the Commodore Amiga as a magic debug value. On Sun Microsystems' Solaris, it marks freed kernel memory. On OpenVMS running on Alpha processors, DEAD_BEEF can be seen by pressing CTRL-T. The DEC Alpha SRM console has a background process that traps memory errors, identified by PS as "BeefEater waiting on 0xdeadbeef".

所以把它当作arg = NULL; 无论如何,我很想知道代码的来源。

关于c - ((uint32_t *)arg) 是什么意思? (上下文如下),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22133192/

相关文章:

java - 在其他电脑上 java.sql.SQLException : No suitable driver found for jdbc:sqlserver

c++ - StartService FAILED 577自签名内核驱动程序,如何解决?

c++ - 如何在 Driver.c controlFunction 接收使用 DeviceIoControl 发送的数据? IOCTL,驱动程序

windows - libusb-win32 : Automated installation of a driver filter

c - 如何将 if else 代码最小化为按位

c - 我有这个错误 : argument of type 'char' is incompatible with parameter of type char*

windows - Windows 中供应商的 OpenGL 驱动程序在哪里?

c - 如何比较两个字符串(两者)都存储在 char 双指针中?

c - 如何提高 C 中文件操作的性能

c - 返回逻辑运算符