自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 资源 (2)
  • 收藏
  • 关注

转载 Memory Reordering Caught in the Act

http://preshing.com/20120515/memory-reordering-caught-in-the-act/#define WIN32_LEAN_AND_MEAN#include #include #include // Set either of these to 1 to prevent CPU reordering#define USE_CPU_FE

2015-09-21 22:45:41 522

转载 [memory fence] Memory Reordering Caught in the Act

http://preshing.com/20120515/memory-reordering-caught-in-the-act/#include #include #include // Set either of these to 1 to prevent CPU reordering#define USE_CPU_FENCE 0#define USE

2015-09-21 22:31:06 560

原创 gcc原子化操作

#include#include#includestatic int count1=0;static int count2=0;void *test_func(void* arg){ int i=0; for(i=0;i<2000;++i) { ++count1; __sync_fetch_and_add(&count2,1); } return 0;}in

2015-09-14 23:12:11 567

原创 [linux]原子化的写文件操作writev

http://linux.die.net/man/2/writevThe data transfers performed by readv() and writev() are atomic: the data written bywritev() is written as a single block that is notintermingled with output from

2015-09-09 22:38:22 1321

转载 Linux Advanced Routing & Traffic Control HOWTO

http://lartc.org/lartc.htmlLinux Advanced Routing & Traffic Control HOWTOBert HubertNetherlabs BVbert.hubert@netherlabs.nl>Thomas Graf (Section Author)tgraf%suug.ch>

2015-09-05 10:20:19 10288

原创 [python]http_server

#!/usr/bin/env python'''http_server.pyprint the input arguments and set cookies'''from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServerfrom urlparse import urlparse, parse_qsimport rand

2015-09-04 09:59:41 671

原创 using public key to decrypt data

openssl  rsautl  -pubin  -in  encrypted-data  -inkey  pub.key  >  decrypt-data

2015-09-01 23:16:51 603

转载 extract the x509 ssl certificate from a pcap file

https://www.wireshark.org/lists/wireshark-users/201003/msg00080.html1) type "ssl.handshake.certificate" in the filter.2) make sure the setting "Allow subdissector to reassemble TCP streams" is o

2015-09-01 23:13:13 918

原创 12306根证书的HASH计算

http://security.stackexchange.com/questions/14330/what-is-the-actual-value-of-a-certificate-fingerprint#!/bin/bash#!12306.cert.shrm srca*wget http://www.12306.cn/mormhweb/ggxxfw/wbyyzj/201106/src

2015-09-01 00:11:01 961

fetch12306

本文在Linux平台上,以Python为开发工具,介绍12306抢票软件的基本原理,并引入示例,讲解如何自己编写一个12306抢票软件。

2016-12-22

lq51--自己写的基于51单片机的嵌入式实时操作系统

Keil 自带的 RTX51—Tiny 系统有这样几个缺点:1、非占先式任 务调度,这样系统的实时性就很难保证;2、提供的系统服务太少, 只有 wait 与 signal。而 RTX51—Tiny 的优点是:1、Keil 公司自己开 发的,使用_task_关键字区别每个任务,这样可以使得被不同任务调 用的不同函数即使没有相互调用,他们的局部变量也不会相互覆盖。 免去了在 SmallRTOS 中需要手动制止函数间局部变量的相互覆盖。 2、内核小。整个 RTX51--Tiny 完整编译只需 900B 的空间。 lq51 系统整合了 RTX51—Tiny 的优点。1、在 lq51 系统中_task_ 关键依然有效,0 号任务依然是最高优先级的任务,1 号任务次之, 依次类推。2、lq51 系统完整编译只需 2.5K 的 ROM,并且系统自带 的 128B RAM 对 lq51 系统也是绰绰有余的。同时 lq51 系统弥补了 RTX51—Tiny 的缺点。首先 lq51 系统采用占先式任务调度,这样可 以最大限度保证系统的实时性。其次 lq51 系统提供 lqDelay、lqWaitFlg、 lqWaitSem、lqWaitMsg 这样四种系统服务,并 且每种系统服务都是可裁剪的。 lq51 系统中很多关于实时系统的概念及实现方法是从 ucosII 中学 来的,同时借鉴了 SmallRTOS 及 RTX51—Tiny。

2009-04-07

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除