X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Ftimothy_tests%2Fthreading%2Ftest_a.c;h=a4bd4152ff98689f0fe6b6c9fc044279696b920c;hp=391530cf077b1b3dd34de396f198d31932c37934;hb=ce0a5fb9849b6dc0d1347709b28d3a34eefec662;hpb=05f5305b2d17b0e2889338724b864cf80f309437 diff --git a/direct/timothy_tests/threading/test_a.c b/direct/timothy_tests/threading/test_a.c index 391530c..a4bd415 100644 --- a/direct/timothy_tests/threading/test_a.c +++ b/direct/timothy_tests/threading/test_a.c @@ -1,7 +1,7 @@ /* * YAFFS: Yet another FFS. A NAND-flash specific file system. * - * Copyright (C) 2002-2010 Aleph One Ltd. + * Copyright (C) 2002-2011 Aleph One Ltd. * for Toby Churchill Ltd and Brightstar Engineering * * Created by Timothy Manning @@ -26,7 +26,7 @@ void test_a(void *x) int pos; int n; int n1; - + struct yaffs_stat stat_buffer; char name[200]; char name1[200]; @@ -90,9 +90,133 @@ void test_a(void *x) yaffs_rmdir(name); return; } + op-=1; + if(op < 0){ + yaffs_rmdir(name); + return; + } + op -=1; + if(op < 0){ + if(bc->h[i]>= 0){ + yaffs_fsync(bc->h[i]); + return; + } + } + op -=1; + if(op < 0){ + if(bc->h[i]>= 0){ + yaffs_fdatasync(bc->h[i]); + return; + } + } + op -=1; + if(op < 0){ + if(bc->h[i]>= 0){ + yaffs_flush(bc->h[i]); + return; + } + } - bc->opMax = (start_op - op -1); - + op -=1; + if(op < 0){ + if((bc->h[i]>= 0) && (bc->h[i+1] < 0)){ + bc->h[i+1]=yaffs_dup(bc->h[i]); + return; + } + } + op -=1; + if(op < 0){ + if(bc->h[i]>= 0){ + yaffs_ftruncate(bc->h[i],n); + return; + } + } + + op -=1; + if(op < 0){ + if(bc->h[i]>= 0){ + yaffs_fstat(bc->h[i],&stat_buffer); + yaffs_fchmod(bc->h[i], n); + yaffs_fchmod(bc->h[i], ((S_IREAD|S_IWRITE)&(stat_buffer.st_mode))); + } + } + op -=1; + if(op < 0){ + if(bc->h[i]>= 0){ + yaffs_stat(name,&stat_buffer); + yaffs_chmod(name, n); + yaffs_chmod(name, ((S_IREAD|S_IWRITE)&(stat_buffer.st_mode))); + } + } + op -=1; + if(op < 0){ + if(bc->h[i]>= 0){ + yaffs_lstat(name,&stat_buffer); + } + } + op -=1; + if(op < 0){ + if(bc->h[i]>= 0){ + yaffs_read(bc->h[i],name,n); + return; + } + } + op -=1; + if(op < 0){ + if(bc->h[i]>= 0){ + yaffs_pread(bc->h[i],name,n,n1); + return; + } + } + op -=1; + if(op < 0){ + if(bc->h[i]>= 0){ + yaffs_write(bc->h[i],name,n); + return; + } + } + op -=1; + if(op < 0){ + if(bc->h[i]>= 0){ + yaffs_pwrite(bc->h[i],name,n,n1); + return; + } + } + op -=1; + if(op < 0){ + if(bc->h[i]>= 0){ + yaffs_truncate(name,n); + return; + } + } + op -=1; + if(op < 0){ + if(bc->h[i]>= 0){ + yaffs_access(name,n); + return; + } + } + op -=1; + if(op < 0){ + if(bc->h[i]>= 0){ + yaffs_symlink(name,name1); + return; + } + } + op -=1; + if(op < 0){ + if(bc->h[i]>= 0){ + yaffs_link(name,name1); + return; + } + } + op -=1; + if(op < 0){ + if(bc->h[i]>= 0){ + yaffs_unlink(name); + return; + } + } return; }