Soumya Koduri [skod...@redhat.com] wrote: > Right. But even on success, "retval" need not be set until the > thread exits with a value other than NULL. > > From the manpage, > >>> > If retval is not NULL, then pthread_join() copies the exit > status of the target thread (i.e., the value that the target thread > supplied to pthread_exit(3)) into the location pointed to by > *retval. If the target thread was canceled, then PTHREAD_CANCELED is > placed in *retval. > <<<<<
The retval that the man page refers there is actually passed in arg to pthread_join. This is never null in your case as you pass &retval. > So to check if the retval is not NULL or if thread in fact had exit > with a value, had declared it as pointer. You don't need to declare it as a pointer if your thread exits with an integer. > No at present, we do not see these messages as UP_THREAD returns > NULL on exit. The only way the existing code makes sense is if your upcall thread exits with a pointer. An integer exit should cause the code crash. Are you really intending to return a valid pointer from your upcall thread rather than an integer? Regards, Malahal. ------------------------------------------------------------------------------ _______________________________________________ Nfs-ganesha-devel mailing list Nfs-ganesha-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel