View | Details | Raw Unified | Return to bug 272238 | Differences between
and this patch

Collapse All | Expand All

(-)b/lib/libthr/thread/thr_pspinlock.c (-1 / +1 lines)
Lines 60-66 _pthread_spin_init(pthread_spinlock_t *lock, int pshared) Link Here
60
	if (lock == NULL)
60
	if (lock == NULL)
61
		return (EINVAL);
61
		return (EINVAL);
62
	if (pshared == PTHREAD_PROCESS_PRIVATE) {
62
	if (pshared == PTHREAD_PROCESS_PRIVATE) {
63
		lck = malloc(sizeof(struct pthread_spinlock));
63
		lck = malloc(roundup(sizeof(struct pthread_spinlock), CACHE_LINE_SIZE));
64
		if (lck == NULL)
64
		if (lck == NULL)
65
			return (ENOMEM);
65
			return (ENOMEM);
66
		*lock = lck;
66
		*lock = lck;
(-)b/lib/libthr/thread/thr_rwlock.c (-1 / +1 lines)
Lines 102-108 rwlock_init(pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr) Link Here
102
102
103
	if (attr == NULL || *attr == NULL ||
103
	if (attr == NULL || *attr == NULL ||
104
	    (*attr)->pshared == PTHREAD_PROCESS_PRIVATE) {
104
	    (*attr)->pshared == PTHREAD_PROCESS_PRIVATE) {
105
		prwlock = calloc(1, sizeof(struct pthread_rwlock));
105
		prwlock = calloc(1, roundup(sizeof(struct pthread_rwlock), CACHE_LINE_SIZE));
106
		if (prwlock == NULL)
106
		if (prwlock == NULL)
107
			return (ENOMEM);
107
			return (ENOMEM);
108
		*rwlock = prwlock;
108
		*rwlock = prwlock;

Return to bug 272238