K 10 svn:author V 3 kib K 8 svn:date V 27 2015-03-21T15:01:19.849934Z K 7 svn:log V 800 Somewhat modernize the SysV shm code: - Use real locking, replace Giant with global sx protecting the subsystem. Since the subsystem' lock is no longer dropped during the sleepsk, remove not needed SHMSEG_WANTED segment flag, and revert r278963. - To do proper code simplification possible after the change of the lock, restructure several functions into _locked body and originally-named wrapper which calls into _locked variant. This allows to eliminate the 'goto done2' spread over the code. - Merge shm_find_segment_by_shmid() and shm_find_segment_by_shmidx(). - Consistently change all function prototypes to ANSI C. Reviewed by: mjg (who has earlier version of the similar patch to introduce real locking) Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks END