上一页 1 2 3 4 5 6 7 ··· 20 下一页
摘要: 1. 实现基础的信号处理 sigaction使用前一定内存清零2. 实现基础的进程模型 wait 等待子进程结束#include #include #include #include #include "common.h"#include "serversignal.h"static volat... 阅读全文
posted @ 2014-07-03 07:25 holycrap 阅读(252) 评论(0) 推荐(0) 编辑
摘要: /**** test how many threads can be created in x86 32 system* * ubuntu 13.0***************************************************************... 阅读全文
posted @ 2014-07-01 21:12 holycrap 阅读(345) 评论(0) 推荐(0) 编辑
摘要: /* * * Copyright (c) International Business Machines Corp., 2001 * * This program is free software; you can redistribute it and/or modify * it... 阅读全文
posted @ 2014-07-01 17:14 holycrap 阅读(255) 评论(0) 推荐(0) 编辑
摘要: #include #include int gcond=0;pthread_mutex_t pm;pthread_cond_t pcond;static void *thread_func(void *arg){ do{ pthread_mute... 阅读全文
posted @ 2014-06-30 17:18 holycrap 阅读(171) 评论(0) 推荐(0) 编辑
摘要: /*************************************************************************\* Copyright (C) Michael Kerrisk, 2014. *... 阅读全文
posted @ 2014-06-30 13:03 holycrap 阅读(336) 评论(0) 推荐(0) 编辑
摘要: 这是一个 autoconf / automake 的"Hello World"gztt.ll@gmail.com主要步骤是- 准备工程目录结构和程序- autoscan 生成 configure.scan- 编辑修改 configure.scan,重命名为 configure.ac 或 config... 阅读全文
posted @ 2014-06-28 10:56 holycrap 阅读(423) 评论(0) 推荐(0) 编辑
摘要: Checklist:每项任务是否有明确的评价标准?每项任务是否有否有明确的时间安排?挑战性的工作是否安排在上午了?决定您一天绩效的关键事情是什么?是否考虑了必要的风险预留时间?是否留出了总结和第二天计划的30min?是否考虑了做下周计划的时间?时间粒度是否在2h以下?谁会打搅您?怎么办?第二天一来第... 阅读全文
posted @ 2014-06-26 16:14 holycrap 阅读(178) 评论(0) 推荐(0) 编辑
摘要: #include "common.h"#include "pool.h"#include static inline void *objmem_to_obj(void *objmem){return objmem + sizeof(pool_obj_head_t);}static inline vo... 阅读全文
posted @ 2014-06-25 09:35 holycrap 阅读(186) 评论(0) 推荐(0) 编辑
摘要: #ifndef COMMON_HHH#define COMMON_HHH#define ASSERT(p) \ do{\ if (!p){\ printf("%s:%d\n",__FILE__,__LINE__ );\ }\ } while (... 阅读全文
posted @ 2014-06-19 17:10 holycrap 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 1. 制表符8个空格2. 每行最长80字符3. 代码块的{放在首行,但是函数的{放在次行4. 只有一行的if块,不加{}5. 不在()前后加空格6. 正常关键字后加一个空格,if, switch, case, for, do, while7. 但是不要在sizeof、typeof、alignof或者... 阅读全文
posted @ 2014-06-17 17:20 holycrap 阅读(456) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 20 下一页