adc.c,macros.h,os.*: Fixed some compiler errors related to new semaphore type, and some errors in the mailbox functions