sysv_msg.c (298585) | sysv_msg.c (298649) |
---|---|
1/*- 2 * Implementation of SVID messages 3 * 4 * Author: Daniel Boulet 5 * 6 * Copyright 1993 Daniel Boulet and RTMX Inc. 7 * 8 * This system call was implemented by Daniel Boulet under contract from RTMX. --- 34 unchanged lines hidden (view full) --- 43 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 44 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 45 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 46 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 47 * SUCH DAMAGE. 48 */ 49 50#include <sys/cdefs.h> | 1/*- 2 * Implementation of SVID messages 3 * 4 * Author: Daniel Boulet 5 * 6 * Copyright 1993 Daniel Boulet and RTMX Inc. 7 * 8 * This system call was implemented by Daniel Boulet under contract from RTMX. --- 34 unchanged lines hidden (view full) --- 43 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 44 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 45 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 46 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 47 * SUCH DAMAGE. 48 */ 49 50#include <sys/cdefs.h> |
51__FBSDID("$FreeBSD: head/sys/kern/sysv_msg.c 298585 2016-04-25 17:06:50Z jamie $"); | 51__FBSDID("$FreeBSD: head/sys/kern/sysv_msg.c 298649 2016-04-26 15:38:17Z pfg $"); |
52 53#include "opt_compat.h" 54#include "opt_sysvipc.h" 55 56#include <sys/param.h> 57#include <sys/systm.h> 58#include <sys/sysproto.h> 59#include <sys/kernel.h> --- 777 unchanged lines hidden (view full) --- 837 PROC_UNLOCK(td->td_proc); 838 error = EAGAIN; 839 goto done2; 840 } 841 PROC_UNLOCK(td->td_proc); 842 } 843#endif 844 | 52 53#include "opt_compat.h" 54#include "opt_sysvipc.h" 55 56#include <sys/param.h> 57#include <sys/systm.h> 58#include <sys/sysproto.h> 59#include <sys/kernel.h> --- 777 unchanged lines hidden (view full) --- 837 PROC_UNLOCK(td->td_proc); 838 error = EAGAIN; 839 goto done2; 840 } 841 PROC_UNLOCK(td->td_proc); 842 } 843#endif 844 |
845 segs_needed = (msgsz + msginfo.msgssz - 1) / msginfo.msgssz; | 845 segs_needed = howmany(msgsz, msginfo.msgssz); |
846 DPRINTF(("msgsz=%zu, msgssz=%d, segs_needed=%d\n", msgsz, 847 msginfo.msgssz, segs_needed)); 848 for (;;) { 849 int need_more_resources = 0; 850 851 /* 852 * check msgsz 853 * (inside this loop in case msg_qbytes changes while we sleep) --- 1044 unchanged lines hidden --- | 846 DPRINTF(("msgsz=%zu, msgssz=%d, segs_needed=%d\n", msgsz, 847 msginfo.msgssz, segs_needed)); 848 for (;;) { 849 int need_more_resources = 0; 850 851 /* 852 * check msgsz 853 * (inside this loop in case msg_qbytes changes while we sleep) --- 1044 unchanged lines hidden --- |