<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[leasonw的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/leasonw</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; leasonw]]></copyright><item><title><![CDATA[C/C++混合编程时extern "C"的使用]]></title><link>https://blog.youkuaiyun.com/leasonw/article/details/94230443</link><guid>https://blog.youkuaiyun.com/leasonw/article/details/94230443</guid><author>leasonw</author><pubDate>Sun, 30 Jun 2019 15:35:43 +0800</pubDate><description><![CDATA[我们在遇到规模较大的项目时候，常常会有C\C++混用的情况，某些功能模块用C语言来实现，而另外一些则用C++。当模块之间相互提供接口供对方使用的时候，必然会看到extern "C"这个字样。那么，这篇文章就来探讨下extern "C"的作用以及使用方法。为了便于更直观的理解，全程都会使用例子的形式来描述。
1 extern "C"是啥
首先，extern "C"它是一个链接指示，一方面，在C++语...]]></description><category></category></item><item><title><![CDATA[清华大学操作系统_LAB4]]></title><link>https://blog.youkuaiyun.com/leasonw/article/details/86387286</link><guid>https://blog.youkuaiyun.com/leasonw/article/details/86387286</guid><author>leasonw</author><pubDate>Sun, 13 Jan 2019 01:02:27 +0800</pubDate><description><![CDATA[内核线程管理
实验执行流程 概述
lab2和lab3完成了对内存的虚拟化 ，但整个控制留还是一条线串行执行。lab4将在此基础上进行CPU的虚拟化，即让ucore实现分时共享CPU，实现多条控制流能够并发执行。
**从某种程度看，我们可以把控制流看做是一个内核线程。**内核线程是一种特殊的进程，内核线程和用户进程的区别有两个：

内核线程只运行在内核态，而用户进程会在用户态和内核态交替运行
所有内...]]></description><category></category></item><item><title><![CDATA[C语言中的位字段]]></title><link>https://blog.youkuaiyun.com/leasonw/article/details/80098797</link><guid>https://blog.youkuaiyun.com/leasonw/article/details/80098797</guid><author>leasonw</author><pubDate>Thu, 26 Apr 2018 19:55:57 +0800</pubDate><description><![CDATA[位字段（bit filed）是C语言中一种存储结构，不同于一般结构体的是它在定义成员的时候需要指定成员所占的位数。位字段是一个signed int或unsigned int类型变量中一组相邻的位（C99和C11新增了Bool类型的位字段）。位字段通过一个结构声明来建立，该结构声明为每个字段提供标签，并确定该字段的宽度。例如，下面的声明建立了4个1位的字段：

struct {

    unsig...]]></description><category></category></item><item><title><![CDATA[Tsinghua_OS_lab1_practice4]]></title><link>https://blog.youkuaiyun.com/leasonw/article/details/80079655</link><guid>https://blog.youkuaiyun.com/leasonw/article/details/80079655</guid><author>leasonw</author><pubDate>Wed, 25 Apr 2018 15:48:24 +0800</pubDate><description><![CDATA[#include &amp;lt;defs.h&amp;gt;
#include &amp;lt;x86.h&amp;gt;
#include &amp;lt;elf.h&amp;gt;

/* *********************************************************************
 * This a dirt simple boot loader, whose sole job is to ...]]></description><category></category></item><item><title><![CDATA[Tsinghua_OS_uCore_Lab1]]></title><link>https://blog.youkuaiyun.com/leasonw/article/details/80068597</link><guid>https://blog.youkuaiyun.com/leasonw/article/details/80068597</guid><author>leasonw</author><pubDate>Tue, 24 Apr 2018 18:26:34 +0800</pubDate><description><![CDATA[#包含头文件&quot;asm.h&quot;
#include &amp;lt;asm.h&amp;gt;

# Start the CPU: switch to 32-bit protected mode, jump into C.
# The BIOS loads this code from the first sector of the hard disk into
# memory at physical address...]]></description><category></category></item><item><title><![CDATA[x86 寄存器]]></title><link>https://blog.youkuaiyun.com/leasonw/article/details/80067404</link><guid>https://blog.youkuaiyun.com/leasonw/article/details/80067404</guid><author>leasonw</author><pubDate>Tue, 24 Apr 2018 17:10:19 +0800</pubDate><description><![CDATA[在x86汇编编程中一个主要的工具就是CPU中的寄存器。这些寄存器就像是在建立在CPU中的变量。使用寄存器代替内存来存储值可以使得处理过程更快和更干净。x86系列处理器有多个不同的寄存器提供使用。这篇文章就是描述每个寄存器的主要用途以及使用方法。需要说明的是，这里描述的规则更像是使用的建议，而不是严格的标准。一些操作确实需要某些特定类型的寄存器才能完成，但大部分的操作你可以自由的使用任意的寄存器。
...]]></description><category></category></item><item><title><![CDATA[TrieTree字典树数据结构的原理、实现及应用]]></title><link>https://blog.youkuaiyun.com/leasonw/article/details/78009402</link><guid>https://blog.youkuaiyun.com/leasonw/article/details/78009402</guid><author>leasonw</author><pubDate>Sun, 17 Sep 2017 12:04:22 +0800</pubDate><description><![CDATA[一、基本知识字典树(TrieTree)，又称单词查找树或键树，是一种树形结构，是一种哈希树的变种。典型应用是用于统计和排序大量的字符串（但不仅限于字符串），所以经常被搜索引擎系统用于文本词频统计。它的优点是：最大限度地减少无谓的字符串比较，查询效率比哈希表高。Trie的核心思想是空间换时间。利用字符串的公共前缀来降低查询时间的开销以达到提高效率的目的。它有3个基本性质： 
根节点不包含字符，除根节点]]></description><category></category></item><item><title><![CDATA[自学编程之路——位运算]]></title><link>https://blog.youkuaiyun.com/leasonw/article/details/77869788</link><guid>https://blog.youkuaiyun.com/leasonw/article/details/77869788</guid><author>leasonw</author><pubDate>Wed, 06 Sep 2017 18:19:26 +0800</pubDate><description><![CDATA[本人在自学编程过程中，有时在阅读一些代码时看到了一些数字位运算。由于缺乏相关的基础知识，阅读起来有一定的困难，有的地方感觉莫名奇妙。后来通过上网查阅相关资料，阅读了相关的博客文章，汇总下来自己的一些理解。首先，说说为何会有位运算这个东西。我们知道，所有的数字信息在计算机中均会以二进制的形式进行存放。例如，一个十进制下的数字20，在二进制下的值为(00010100)，数字30在二进制下的值为(0001]]></description><category></category></item></channel></rss>