Added comments to shmlib.c