aboutsummaryrefslogtreecommitdiff
path: root/libpipe/pq.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix const warningsSamuel Thibault2022-01-171-2/+2
| | | | | Now that the RPCs have const, this forces us cleaning our const-meant functions.
* Replace `bcopy' with `memcpy' or `memmove' as appropriateJustus Winter2014-12-101-6/+6
| | | | | | | | | | | | | | | | | | | * ext2fs/inode.c: Replace `bcopy' with `memcpy' or `memmove' as appropriate. * ext2fs/pager.c: Likewise. * isofs/lookup.c: Likewise. * isofs/main.c: Likewise. * isofs/rr.c: Likewise. * libdiskfs/file-get-trans.c: Likewise. * libiohelp/return-buffer.c: Likewise. * libpager/pagemap.c: Likewise. * libpipe/pq.c: Likewise. * libpipe/pq.h: Likewise. * libstore/unzipstore.c: Likewise. * mach-defpager/default_pager.c: Likewise. * pfinet/ethernet.c: Likewise. * pfinet/tunnel.c: Likewise. * storeio/dev.c: Likewise.
* Add MSG_PEEK support to pflocalSamuel Thibault2012-04-271-7/+30
| | | | | | | | | | | | | | * libpipe/pq.h (packet_peek): Declare new function. * libpipe/pq.c (packet_read): Move code to new `packet_fetch' function, call it with `remove' set to 1. (packet_fetch): New function with code from `packet_read', but do not remove data if `remove' is 0. (packet_peek): New function, calls `packet_fetch' with `remove' set to 0. * libpipe/dgram.c (dgram_read): When MSG_PEEK is in *flags, do not dequeue and only peek data. * libpipe/seqpack.c (seqpack_read): Likewise. * libpipe/stream.c (stream_read): Likewise. * pflocal/socket.c (S_socket_recv): Pass MSG_PEEK flag to libpipe.
* 2006-07-25 Stefan Siegl <stesie@brokenpipe.de>Thomas Schwinge2006-07-251-3/+5
| | | | | | * pq.c (packet_write): Only dereference AMOUNT if it is not the null pointer and document the change. * pq.h (packet_write): Document the change.
* Update copyright year.Marcus Brinkmann2002-04-241-1/+1
|
* 2002-04-22 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann2002-04-221-5/+8
| | | | | | | | | | * pq.c (packet_set_ports): Correctly replace old ports buffer with new one. Take size of mach_port_t rather than pointer to it. (packet_read_ports): Take size of mach_port_t rather than pointer to it. (pq_queue): Update PACKET->num_ports, PACKET->buf_start and PACKET->buf_end for reused packets as well. Submitted by Ognyan Kulev <ogi@fmi.uni-sofia.bg>.
* 1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell1999-07-111-7/+8
| | | | | | * pq.c (packet_realloc): Use mmap instead of vm_allocate. (packet_read_ports): Likewise. (packet_read): Likewise.
* 1999-07-10 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-07-111-0/+1
| | | | * pq.c: Add #include <sys/mman.h> for munmap decl.
* 1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell1999-07-031-3/+2
| | | | * pq.c (free_packets): Use munmap instead of vm_deallocate.
* Add braces to silence gcc warnings.Roland McGrath1998-10-201-13/+17
|
* (pq_queue): Initialize packet->buf_vm_alloced.Miles Bader1996-07-011-1/+2
|
* (packet_read): If there's lots of empty space at the beginning of aMiles Bader1996-01-231-3/+22
| | | | vm_alloced buffer, deallocate it.
* (packet_realloc): Reflect in the new values of BUF_START & BUF_END that we'veMiles Bader1996-01-221-2/+2
| | | | removed any empty space at the beginning of BUF.
* (packet_size_adjust): Function removed.Miles Bader1996-01-141-39/+33
| | | | | | (packet_new_size): New function. (packet_read): Re-arrange to be slightly less confusing. Reverse start-past-buf-beginning test that may have leaked memory.
* (pq_queue): Initialize the ports_alloced field.Miles Bader1996-01-121-5/+9
| | | | | (packet_read): When a page-aligned read consumes the whole buffer, but there's a non-page-multiple amount available, don't let buf_len go negative.
* (packet_read): Don't leave PACKET in a fucked up state when it's vm_allocate'dMiles Bader1995-09-071-13/+30
| | | | but doesn't a page-multiple amount of data and we're reading everything.
* Initial revisionMiles Bader1995-07-261-0/+394