summaryrefslogtreecommitdiff
path: root/shmem
Commit message (Collapse)AuthorAgeFilesLines
* Update our copyright for this year.fielding2002-03-134-4/+4
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63117 13f79535-47bb-0310-9956-ffa450edef68
* get rid of some questions now that Aaron has checked it overtrawick2002-03-041-5/+0
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63079 13f79535-47bb-0310-9956-ffa450edef68
* preserve the proper alignment when we use the start of the sharedtrawick2002-03-041-6/+13
| | | | | | | memory for metadata git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63078 13f79535-47bb-0310-9956-ffa450edef68
* Get the shmem code building again on beos.dreid2002-02-141-0/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62985 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Fix option flags attaching to an existing shared memory block.bjh2002-02-121-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62947 13f79535-47bb-0310-9956-ffa450edef68
* not allocating memory for the metadata..ianh2002-02-051-1/+1
| | | | | | | | | Thanks Jin. Submitted by: Jin Hong <jinh@cnet.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62912 13f79535-47bb-0310-9956-ffa450edef68
* Fix a few attempts to add to a void *ptr in the Unix shared memorytrawick2002-02-041-3/+3
| | | | | | | | | | | | code. PR: 9710 Submitted by: Per Ekman [pek@pdc.kth.se] Reviewed by: Jeff Trawick, who expanded Per's fix to a couple of more places (so all breakage is mine :) ) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62911 13f79535-47bb-0310-9956-ffa450edef68
* Fixed up some comments -- got rid of FIXMEs that have been fixed.aaron2002-01-301-6/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62875 13f79535-47bb-0310-9956-ffa450edef68
* Implement shared memory cleanup handlers on Unix for both the originalaaron2002-01-291-66/+98
| | | | | | | | creating process' pool (cleans up after apr_shm_create) and an attaching process' pool (cleans up after apr_shm_attach). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62848 13f79535-47bb-0310-9956-ffa450edef68
* Mladen Turk's <mturk@mappingsoft.com> WinCE port.wrowe2002-01-281-4/+8
| | | | | | | | | | | | | | | | | | | Nearly, the apr.hw patch needs some review. In short, several quite standard ansi headers (e.g. time.h) aren't present in the WinCT port, but these changes require corresponding changes to apr.h.in. I changed Mladen's #define'd symbol names for the macro blocks to IF_WIN_OS_IS_UNICODE and ELSE_WIN_OS_IS_ANSI to make the code a bit more readable, and drop the global apr_os_level from each macro invocation. Also, I changed the scope of his APR_HAS_ANSI_FS to local scope, since it has no application in the public headers. Mladen's patch helps NT as well, allowing the /D WINNT flag to define NT-only compilations. With WINNT defined, all UNICODE/ANSI os version tests drop out entirely. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62837 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Implement apr_os_shm_get/put.bjh2002-01-281-2/+17
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62836 13f79535-47bb-0310-9956-ffa450edef68
* Simple workaround, for now. Aaron is researching, but if somethingwrowe2002-01-254-0/+43
| | | | | | | | | obscure is already obvious to OS2/BeOS folks, feel free to round out. I suspect it's simply the pointer to the phys mem, filling out the internals of apr_shm_t, but I'm not certain. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62831 13f79535-47bb-0310-9956-ffa450edef68
* Win32 requires an apr_os accessor for shm regions. This allows us towrowe2002-01-251-0/+32
| | | | | | | | | | | take the handle and do interesting things, such as passing it (after duping it) into the child. Unix implementation is simply the address of the shm region, AFAICT, but Aaron is reviewing. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62830 13f79535-47bb-0310-9956-ffa450edef68
* Fix a small problem with the name of the area we create. This isdreid2002-01-241-1/+1
| | | | | | | temporary but gets the server running again. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62826 13f79535-47bb-0310-9956-ffa450edef68
* Problem resolved; how exactly I'm not certain, but we have no faultswrowe2002-01-241-16/+2
| | | | | | | | | | creating either anon or named memory now. Of course, reattaching a detached processes anon handle requires some further efforts. An apr_shm_os_get/put should help. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62822 13f79535-47bb-0310-9956-ffa450edef68
* Major updates to the Unix shmem implementation:aaron2002-01-231-79/+199
| | | | | | | | | | | | | | | | - Name-based shmem now works on all tested platforms (linux, solaris) and on all shmem flavors. - All critical FIXMEs are now fixed. - Much more robust error checking. - Properly implemented attach/detach and destroy routines. - Fixed a couple bugs having to do with the segment length. - Temp files/mmaped files are now removed after use. - mmaped files, temp files, and segments are now created exclusively, meaning that the create function will fail if the file already exists (this has important security implications). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62816 13f79535-47bb-0310-9956-ffa450edef68
* Add some more comments and more robust error checking.aaron2002-01-221-8/+11
| | | | | | | | | | Changed the return error from apr_shm_attach if filename == NULL. Normally in APR input parameters are not explicitly checked, but since in apr_shm a NULL filename has a special meaning (anonymous memory) it will now return APR_EINVAL in that case. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62814 13f79535-47bb-0310-9956-ffa450edef68
* Implement apr_shm_detach for name-based shmget().aaron2002-01-171-2/+4
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62800 13f79535-47bb-0310-9956-ffa450edef68
* Fix a bug in the APR_USE_SHMEM_SHMGET type of name-based sharedaaron2002-01-161-22/+18
| | | | | | | | | | | memory. When a segment has been marked for deletion, other processes are not allowed to attach to that segment. This also fixes the problem with the name-based portion of the testshm.c test. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62798 13f79535-47bb-0310-9956-ffa450edef68
* Remove some cruft from the Unix shm implementation.aaron2002-01-161-19/+0
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62796 13f79535-47bb-0310-9956-ffa450edef68
* Mark SysV anon shared memory segments for deletion,jim2002-01-151-0/+5
| | | | | | | so if we crash, they are removed git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62792 13f79535-47bb-0310-9956-ffa450edef68
* After running testshm, this commit gets us passing all the tests OK.dreid2002-01-131-12/+30
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62777 13f79535-47bb-0310-9956-ffa450edef68
* More shmem fixes...dreid2002-01-121-7/+27
| | | | | | | | | - change the p -> pool and add a pool accessor - add the attach/detach code - adjust the name we give an area so it's more descriptive git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62762 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Add shm pool accessor.bjh2002-01-121-0/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62758 13f79535-47bb-0310-9956-ffa450edef68
* Few changes that actually get us building well enough for apache. More todreid2002-01-111-4/+8
| | | | | | | follow. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62754 13f79535-47bb-0310-9956-ffa450edef68
* First step to getting shmem building on beos.dreid2002-01-112-7/+7
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62753 13f79535-47bb-0310-9956-ffa450edef68
* Simple solutions? No, but document some observations.wrowe2002-01-111-2/+22
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62747 13f79535-47bb-0310-9956-ffa450edef68
* HP compiler doesn't like using < operator with pointer and scalartrawick2002-01-111-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62745 13f79535-47bb-0310-9956-ffa450edef68
* get some pointer arithmetic to compile on picky compilerstrawick2002-01-101-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62740 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Pound the new shm code into some kind of working order.bjh2002-01-102-25/+49
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62739 13f79535-47bb-0310-9956-ffa450edef68
* This is the new apr_shm_t API. It completely replaces the old sharedaaron2002-01-106-707/+602
| | | | | | | | | | | | | | | | | | | | | memory API, which was unusable on Win32 and other platforms that do not have inherited shared memory segments since it only supported anonymous memory. We now support both anonymous and name-based shared memory. Anonymous shmem tested to work on the following platforms: Linux 2.2, Linux 2.4, Solaris 8, FreeBSD 5.0-CURRENT Name-based shmem is _not_ fully functional on UNIX, but this API replaces all of the preexisting apr_shmem_t functionality. Stubs were provided for Beos and OS/2, and as much relevant code as possible was preserved, but no guarantees of correctness. Reviewed by: Justin Erenkrantz, Will Rowe git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62735 13f79535-47bb-0310-9956-ffa450edef68
* Fix a bug that appears when specifying the length [inherit thewrowe2002-01-101-16/+8
| | | | | | | | physical length after apr_file_trunc] and change the api a bit for Aaron's new apr_shm.h git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62733 13f79535-47bb-0310-9956-ffa450edef68
* Correct the shm length returned based on the original reqsizewrowe2002-01-091-4/+5
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62730 13f79535-47bb-0310-9956-ffa450edef68
* Some modest improvements pointed out by Aaron.wrowe2002-01-091-10/+18
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62729 13f79535-47bb-0310-9956-ffa450edef68
* This now builds with Aaron's new apr_shm.h header. I'll not drop itwrowe2002-01-091-0/+259
| | | | | | | into the libapr/apr.dsp files until that header is committed. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62728 13f79535-47bb-0310-9956-ffa450edef68
* Add the ability to pass flags to both apr_file_open and apr_mktemp.rbb2002-01-081-1/+1
| | | | | | | | | The reason for this, is that it is very possible to want a temp file that isn't deleted when the file is closed. It also makes sense to have the flags in the apr_file_t if possible. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62716 13f79535-47bb-0310-9956-ffa450edef68
* Agree with Jeff [thanks] ... completion doesn't need to be so wordy.wrowe2002-01-052-4/+4
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62708 13f79535-47bb-0310-9956-ffa450edef68
* get shmem.c to compile again after changes to apr_shmem.htrawick2002-01-051-2/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62707 13f79535-47bb-0310-9956-ffa450edef68
* Normalize an opaque type to our current conventions.wrowe2002-01-053-24/+24
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62706 13f79535-47bb-0310-9956-ffa450edef68
* roll the extra apr_lock_create_np() functionality into apr_lock_create()trawick2001-12-291-1/+2
| | | | | | | | | | | and get rid of apr_lock_create_np(); apr_lock_create() has a new parameter for specifying the lock mechanism (or APR_LOCK_DEFAULT to let APR choose) (same for apr_proc_mutex_create_np() and apr_proc_mutex_create()) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62684 13f79535-47bb-0310-9956-ffa450edef68
* Fix handling of named shared memorybjh2001-12-291-1/+6
| | | | | | | | Allocate some extra space for heap structures so that a block of the same size as the reqsize can be allocated later with apr_shm_malloc(). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62681 13f79535-47bb-0310-9956-ffa450edef68
* bye byegstein2001-08-311-11/+0
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62264 13f79535-47bb-0310-9956-ffa450edef68
* when creating a shared memory segment using SysV, be suretrawick2001-08-301-0/+4
| | | | | | | | | | | to specify that the segment will go away when the last user detaches This fixes a problem with Apache leaving behind a shared memory segments at termination. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62256 13f79535-47bb-0310-9956-ffa450edef68
* fix some bad retcodes (adding APR_OS_START_SYSERR to errno) in thetrawick2001-08-301-4/+4
| | | | | | | | | | | shared memory code for unix there are still some unexpected uses of APR_EGENERAL and a general lack of cleanup of previous steps when something goes wrong (not always a reasonable thing to do with shared memory) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62254 13f79535-47bb-0310-9956-ffa450edef68
* Fix a segfault when we try to memset NULL (the user is out of memory injerenkrantz2001-08-301-1/+2
| | | | | | | | | | | | | | | that shared memory segment). apr_shm_malloc will either return valid memory or NULL, so this is a useful check. When using libc's malloc(), that isn't necessarily the case. However, this patch requires the caller to check for a NULL return which they probably don't do anyway, so the segfault gets moved out of APR and into the caller. That's good enough for now... PR: Graham's posts to dev@apr git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62250 13f79535-47bb-0310-9956-ffa450edef68
* Remove MM from the source tree. We don't use it anymore.rbb2001-08-2329-16127/+0
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62214 13f79535-47bb-0310-9956-ffa450edef68
* get shmem.c to compile on platforms that have different names for SHM_Rgregames2001-08-201-0/+6
| | | | | | | | | and SHM_W (e.g. OS/390) Submitted by: Jeff Trawick git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62203 13f79535-47bb-0310-9956-ffa450edef68
* don't do arithmetic with void *trawick2001-08-151-3/+3
| | | | | | | | this definitely clears up warnings on Tru64 and should get APR building again on HP-UX, where this is an error git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62165 13f79535-47bb-0310-9956-ffa450edef68
* Remove all warnings from the shared memory code.rbb2001-08-141-4/+8
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62161 13f79535-47bb-0310-9956-ffa450edef68
* Fix the new shared memory code. We need to pass a pointer torbb2001-08-141-3/+3
| | | | | | | | | | an apr_file_t to apr_file_open. Also, apr_os_file_get returns a status value, not the OS file descriptor. This gets Apache running again on Linux. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62160 13f79535-47bb-0310-9956-ffa450edef68