共 8 篇文章
显示摘要每页显示  条
How to read Haskell like Python : Inside 206.One consequence of this is we sometimes need parentheses for arguments: f a (b1 + b2) c translates into f(a, b1 + b2, c).It''s just another one of Haskell’s quirks.This is not bad, for a very superficial understanding of Haskell syntax (there''s only one ob...
Semaphore.SemaphoreMutex vs.(A mutex is really a semaphore with value 1.) (*Officially: "A semaphore restricts the number of simultaneous users ofa shared resource up to a maximum number. Threads can request access tothe resource (decrementing the semaphore), and can signal that theyhave finished using the resour...
Memory Management Memory Management。Giving the machine to one process and keeping just that one processin memory does not work if we want to run multiple programsconcurrently.A slab is one block of contiguous memory, oftenseveral pages in size.Within each kmem_cache structure are three pointers:one to a list of full ...
6.2.1 Basic Concepts6.2.1 Basic Concepts.When a process creates a pipe, the kernel sets up two file descriptors for useby the pipe.One descriptor is used to allow a path of input into the pipe (write),while the other is used to obtain data from the pipe (read).To send data to the pipe, we use the write() system call, ...
6.2.2 Creating Pipes in C.pipe(fd);Since file descriptor 0 (stdin) was closed, the call to dup() duplicated the input descriptor of the pipe (fd0) onto its standard input.RETURNS: new descriptor on success -1 on error: errno = EBADF (oldfd is not a valid descriptor) EBADF (newfd is out of range) EMFILE (too many descr...
虽然Linux的核心代码大部分是用C语言编写的,但是不可避免的其中 还是有一部分是用汇编语言写成的。有些汇编语言代码是直接写在汇 编源程序中的,特别是Linux的启动代码部分;还有一些则是利用gcc 的内嵌汇编语言嵌在C语言程序中的。这篇文章简单介绍了gcc中的内 嵌式汇编语言,主要想帮助那些才开始阅读Linux核心代码的朋友们 能够...
帮助 | 留言交流 | 联系我们 | 服务条款 | 下载网文摘手 | 下载手机客户端
北京六智信息技术股份有限公司 Copyright© 2005-2024 360doc.com , All Rights Reserved
京ICP证090625号 京ICP备05038915号 京网文[2016]6433-853号 京公网安备11010502030377号
返回
顶部