Deleted Added
full compact
thr_attr.c (176815) thr_attr.c (176864)
1/*
2 * Copyright (c) 2003 Craig Rodrigues <rodrigc@attbi.com>.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 76 unchanged lines hidden (view full) ---

85 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
86 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
87 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
88 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
89 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
90 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
91 * SUCH DAMAGE.
92 *
1/*
2 * Copyright (c) 2003 Craig Rodrigues <rodrigc@attbi.com>.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 76 unchanged lines hidden (view full) ---

85 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
86 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
87 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
88 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
89 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
90 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
91 * SUCH DAMAGE.
92 *
93 * $FreeBSD: head/lib/libthr/thread/thr_attr.c 176815 2008-03-05 06:55:48Z davidxu $
93 * $FreeBSD: head/lib/libthr/thread/thr_attr.c 176864 2008-03-06 03:24:03Z davidxu $
94 */
95
96#include "namespace.h"
97#include <errno.h>
98#include <pthread.h>
99#include <stdlib.h>
100#include <string.h>
101#include <pthread_np.h>

--- 495 unchanged lines hidden (view full) ---

597 }
598 void *newset = realloc(attr->cpuset, cpusetsize);
599 if (newset == NULL)
600 return (ENOMEM);
601 attr->cpuset = newset;
602 attr->cpusetsize = cpusetsize;
603 } else {
604 memset(((char *)attr->cpuset) + cpusetsize, 0,
94 */
95
96#include "namespace.h"
97#include <errno.h>
98#include <pthread.h>
99#include <stdlib.h>
100#include <string.h>
101#include <pthread_np.h>

--- 495 unchanged lines hidden (view full) ---

597 }
598 void *newset = realloc(attr->cpuset, cpusetsize);
599 if (newset == NULL)
600 return (ENOMEM);
601 attr->cpuset = newset;
602 attr->cpusetsize = cpusetsize;
603 } else {
604 memset(((char *)attr->cpuset) + cpusetsize, 0,
605 cpusetsize - attr->cpusetsize);
605 attr->cpusetsize - cpusetsize);
606 attr->cpusetsize = cpusetsize;
607 }
608 memcpy(attr->cpuset, cpuset, cpusetsize);
609 ret = 0;
610 }
611 return (ret);
612}
613

--- 24 unchanged lines hidden ---
606 attr->cpusetsize = cpusetsize;
607 }
608 memcpy(attr->cpuset, cpuset, cpusetsize);
609 ret = 0;
610 }
611 return (ret);
612}
613

--- 24 unchanged lines hidden ---