91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

基于Linux環境下利用線程池實現大批量文件拷貝,包括文件IO操作、線程池操作

資源截圖

代碼片段和文件信息

#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?

#include?“thread_pool.h“

struct?file
{
char?srcfile[50];
char?dstfile[50];
};


thread_pool?*pool;

//拷貝普通文件
void?*copyregfile(void?*arg)
{
//printf(“=================enter?copyregfile====================\n“);

struct?file?*dofile?=?(struct?file?*)arg;

printf(“srcfile=%s\n“dofile->srcfile);
printf(“dstfile?=%s\n“dofile->dstfile?);

struct?stat?file_stat;
stat(dofile->srcfile?&file_stat);//獲取文件的屬性

int?srcfddstfd;
srcfd?=?open(dofile->srcfileO_RDONLY);
if(srcfd?==?-1?)
{
printf(“open?file?%s\n?failed.\n“dofile->srcfile);
return?NULL;
}
dstfd?

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????3341??2016-08-22?12:52??threadpool_bk\main.c

?????文件????????213??2016-08-13?21:34??threadpool_bk\Makefile

?????文件??????21248??2016-08-22?12:54??threadpool_bk\mycopy

?????文件???????3769??2016-08-13?21:34??threadpool_bk\thread_pool.c

?????文件????????974??2016-08-13?21:34??threadpool_bk\thread_pool.h

?????目錄??????????0??2016-08-22?12:54??threadpool_bk

?????文件???????3371??2016-12-12?20:06??拷貝目錄線程池\threadpool_bk\main.c

?????文件????????213??2016-08-13?21:34??拷貝目錄線程池\threadpool_bk\Makefile

?????文件??????21248??2016-08-22?12:54??拷貝目錄線程池\threadpool_bk\mycopy

?????文件???????1137??2016-12-10?10:20??拷貝目錄線程池\threadpool_bk\sublime_text.exe.lnk

?????文件???????4688??2016-12-12?20:06??拷貝目錄線程池\threadpool_bk\thread_pool.c

?????文件???????1183??2016-12-12?20:06??拷貝目錄線程池\threadpool_bk\thread_pool.h

?????目錄??????????0??2016-12-19?13:06??拷貝目錄線程池\threadpool_bk

?????目錄??????????0??2016-12-07?14:56??拷貝目錄線程池

-----------?---------??----------?-----??----

????????????????61385????????????????????14


評論

共有 條評論