Search found 7 matches

by huyi_zg
Thu Oct 19, 2006 9:43 am
Forum: PSP Development
Topic: how to use sceIoGetThreadCwd?
Replies: 8
Views: 2167

but it always doesn't work correctly in my programe, dit me forget anything? it's my code: if &#40;mkdir&#40;path, 0777&#41; < 0&#41; &#123; if &#40;errno == ENAMETOOLONG&#41; &#123; return -2; &#125; return -1; &#125; return 0; when I set path as a very long ...
by huyi_zg
Wed Oct 18, 2006 4:04 pm
Forum: PSP Development
Topic: how to use sceIoGetThreadCwd?
Replies: 8
Views: 2167

hi TyRaNiD,
I have checked my build.mak after reading your reply.
I have found USE_KERNEL_LIBC and USE_PSPSDK_LIBC, what's the different?how to choose this flag?

In newlib, how many functions can work nice, is there a list like libc/LIB.status?

thank you.
by huyi_zg
Wed Oct 18, 2006 12:16 pm
Forum: PSP Development
Topic: how to use sceIoGetThreadCwd?
Replies: 8
Views: 2167

I'm not sure about the relation between pspsdk and newlib right now, so I use sceXXX functions directly.maybe cause the confusion. can you teach me what's the relation ? I only know newlib is encapsulation, provide useful functions , I found newlib-psp directory in the svn, and libc subdirectory in ...
by huyi_zg
Wed Oct 18, 2006 3:04 am
Forum: PSP Development
Topic: how to use sceIoGetThreadCwd?
Replies: 8
Views: 2167

thx TyRaNiD. I made a little change, and test again: first of all, client code hasn't invoke these function, just compiled it and pack to my static lib. 1. std::string Directory::GetCurrentDirectory() { SceUID tid; int rt; char buff[MAXPATHLEN]; tid = sceKernelGetThreadId(); rt = sceIoGetThreadCwd(t...
by huyi_zg
Wed Oct 18, 2006 12:48 am
Forum: PSP Development
Topic: how to use sceIoGetThreadCwd?
Replies: 8
Views: 2167

how to use sceIoGetThreadCwd?

before is my code: SceUID tid; char buff[MAXPATHLEN]; tid = sceKernelGetThreadId(); sceIoGetThreadCwd(tid, buff, sizeof(buff)); but the game crashed. sceKernelGetThreadId return a int value, I think it's not that sceIoGetThreadCwd needs as the first parameter. anyone knows how to use sceIoGetThreadC...
by huyi_zg
Tue Oct 17, 2006 10:17 am
Forum: PSP Development
Topic: how to know the error string of the error?
Replies: 4
Views: 1802

thanks jimparis.

how to make error thread safe? Can I use TLS?
by huyi_zg
Mon Oct 16, 2006 5:29 pm
Forum: PSP Development
Topic: how to know the error string of the error?
Replies: 4
Views: 1802

how to know the error string of the error?

1.is there a way to know the error string?
example:
I have invoked this method: sceIoGetThreadCwd, and get the return value ret(ret < 0), how to know what's the error reason?

2.is errno in libc thread safe?