Update ipc_write() to use revamped locks
Update ipc_read() to use revamped locks; also bugfixes