cudaSetDevice() problem from pthread

I am running CentOS 5.5 with one device installed (GTX 580)

I am spawning some pthreads that I am trying to each get working in the same context. However, when I run the following code in my worker threads, I get a different value than in the main thread

cudaError er = cudaSetDevice(0);

CUcontext localctx;

I was under the impression thati n CUDA 4, setting a device in a worker thread gave it the same context as the host thread?

Further, using cudaSetDevice() in my worker thread, and then trying to check the memory availability:

size_t freeMem, total;
cuMemGetInfo(&freeMem, &total);

returns zero for bothe free and total. What am I doing wrong?