该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
C和C++混合的,当然还有汇编
引用:
Most of the source code for Windows NT is written in C or C++. These
high-level languages make it relatively easy to port Windows NT to
different types of workstations. The same source code can be recompiled
to build versions of Windows NT that are specific to each processor's
instruction set.
A small amount of the code in Windows NT is written in
assembly language. Typically, this is code that either interacts
directly with a computer's hardware, or needs to run extremely fast.
Because assembly language is specific to a particular instruction set,
this code must be rewritten once for each type of processor on which
Windows NT will run. To make it easy to locate and maintain, this code
is isolated to just a few key places in the operating system:
The kernel is the heart of the Windows NT operating system.
It controls which threads are run on the system's processor(s), and
provides synchronization mechanisms that allow threads on multiple
processors to coordinate their access to operating system data
structures. It also dispatches interrupts and exceptions to the
appropriate handler routines. To optimize the speed of these
system-critical operations, portions of the kernel are written in
assembly language.