diff options
author | scottc <scottc> | 2002-06-30 21:01:47 +0000 |
---|---|---|
committer | scottc <scottc> | 2002-06-30 21:01:47 +0000 |
commit | 779931699c4284209e9607b7df2449beb4abbac2 (patch) | |
tree | 345d75b70b209566d0efb9ac2ce41f50406f9936 /winsup/cygwin/cygserver_shm.cc | |
parent | 32fc836f5ca98c3dd4f0733e95372af72131aba0 (diff) | |
download | gdb-779931699c4284209e9607b7df2449beb4abbac2.tar.gz |
* woutsup.h: Remove all uses of the C++ new and delete operators
throughout cygserver until they are fully thread-safe.
(safe_new0): New macro to replace the C++ new operator.
(safe_new): Ditto.
(safe_delete): New macro to replace the C++ delete operator.
* cygserver_client.cc (client_request::handle_request): Replace
all uses of the C++ new and delete operators with the new macros
from "woutsup.h".
(client_request::make_request): Ditto.
* cygserver_process.cc (~process_cleanup): Ditto.
(process::cleanup): Ditto.
(process_cache::process): Ditto.
(process_cache::check_and_remove_process): Ditto.
* cygserver_shm.cc (server_shmmgr::new_segment): Ditto.
(server_shmmgr::delete_segment): Ditto.
* cygserver_transport.cc (create_server_transport): Ditto.
* cygserver_transport_pipes.cc
(transport_layer_pipes::accept): Ditto.
* cygserver_transport_sockets.cc
(transport_layer_sockets::accept): Ditto.
* threaded_queue.cc (~threaded_queue): Ditto.
(threaded_queue::worker_loop): Ditto.
(threaded_queue::stop): Replace sleep(3) with win32 Sleep.
* cygserver.cc (~server_request): Replace all uses of the C++ new
and delete operators with the new macros from "woutsup.h".
(server_submission_loop::request_loop): Ditto.
(main): Ditto. Replace sleep(3) with win32 Sleep. Replace
iostreams with FILEs.
(print_usage): Replace iostreams with FILEs.
(print_version): Ditto.
Diffstat (limited to 'winsup/cygwin/cygserver_shm.cc')
-rwxr-xr-x | winsup/cygwin/cygserver_shm.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/cygserver_shm.cc b/winsup/cygwin/cygserver_shm.cc index 2df6522ed1a..51c3d3b850f 100755 --- a/winsup/cygwin/cygserver_shm.cc +++ b/winsup/cygwin/cygserver_shm.cc @@ -447,7 +447,7 @@ server_shmmgr::new_segment (const key_t key, const HANDLE hFileMap) previous = segptr; } - segment_t *const segptr = new segment_t (key, shmid, hFileMap); + segment_t *const segptr = safe_new (segment_t, key, shmid, hFileMap); assert (segptr); @@ -501,7 +501,7 @@ server_shmmgr::delete_segment (segment_t *const segptr) assert (_shmid_cnt > 0); _shmid_cnt -= 1; - delete segptr; + safe_delete (segment_t, segptr); } /*---------------------------------------------------------------------------* |