Re: [Sablevm-developer] Errno usage considered harmful?!
Brought to you by:
egagnon
From: Etienne G. <gag...@uq...> - 2004-03-10 14:05:02
|
Hi Greg, Grzegorz B. Prokopski wrote: > 1. If I add: > #include <errno.h> > extern int errno; > I get such warning: > java_lang_ProcessImpl.c:24: warning: function declaration isn't a > prototype You should NEVER declare errno. #include <errno.h> declares it appropriately. (It can be a macro, of many things, specially when you compile with multi-threading support). > 2. In interrupt() implementation I use a pointer to pthread_cond_t: > volatile pthread_cond_t *sleeping_on_cond; > I also keep getting this warning: > java_lang_VMThread.c:342: warning: passing arg 1 of > `pthread_cond_broadcast' discards qualifiers from pointer target type > which is such code: > pthread_cond_broadcast (env_other->thread.sleeping_on_cond); Why aren't you using SableVM's wrapper for broadcasting? I think that we should discuss your code in my office; it would be quicker than long emails... Etienne -- Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/ SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |