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/