自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 资源 (1)
  • 收藏
  • 关注

原创 main.cpp

//main.cpp #include #include #include #include "global.h" using namespace std; int main(int argc, char **argv) { pthread_t *tids; int cnt = 0; int nProducers; int nConsumers;

2013-10-27 21:36:30 798

原创 makefile

objects = main.o blkConsumer.o blkProducer.o \ buffer.o global.o targets = parallel_copy .PHONY: all clean all: $(targets) parallel_copy: main.o blkConsumer.o blkProducer.o \

2013-10-27 21:31:54 465

原创 chengchanzhe

#include #include "global.h" using std::cout; using std::cerr; using std::endl; void *blkProducer(void *producerNum) { int count; int *nproducers = (int *)producerNum; for (;;) { //对互斥量buff

2013-10-27 21:22:48 454

原创 buffer.cpp

//对结构体buff_node进行初始化 void bufferInit(void) { head = (buff_node *)malloc(sizeof(buff_node)); head->node_id = 0; head->next = head; tail = head;//实现循环链表形式 return; }

2013-10-27 21:15:22 587

原创 global.cpp

#include "global.h" unsigned long blockIndex= 0; int fileFd; int bufferNum = BUFFNUM; buff_node *head; buff_node *tail; buff_node *temp; void bufferInit(void); void *blkProducer(void *); void *blkCons

2013-10-27 21:13:11 687

原创 global.h 源文件

#include #include #include #include #include #include #define MAXBLOCK 250 #define BUFFNUM 200 #define blockSize 16 #ifndef GLOBAL_HEADER_H #define GLOBAL_HEADER_H //定义三个全局变量 extern unsigned

2013-10-27 21:10:08 5370

原创 代码编辑器

#include #include "sizeofall.c" void main(int args, char *argv[]) { float size; size=sizeofall(argv[1], 6); printf("size is %.3f\n",size); }

2013-10-26 20:34:21 493

空空如也

空空如也

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

TA关注的人

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