"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "stress-sem-sysv.c" between
stress-ng-0.12.09.tar.xz and stress-ng-0.12.10.tar.xz

About: stress-ng will stress test a computer system in various selectable ways. It was designed to exercise various physical subsystems of a computer as well as the various operating system kernel interfaces.

stress-sem-sysv.c  (stress-ng-0.12.09.tar.xz):stress-sem-sysv.c  (stress-ng-0.12.10.tar.xz)
skipping to change at line 262 skipping to change at line 262
#if defined(IPC_SET) #if defined(IPC_SET)
s.buf = &ds; s.buf = &ds;
ret = semctl(sem_id, 2, IPC_SET, &s); ret = semctl(sem_id, 2, IPC_SET, &s);
(void)ret; (void)ret;
#endif #endif
} }
#if defined(GETALL) #if defined(GETALL)
/* Avoid zero array size allocation */ /* Avoid zero array size allocation */
nsems = ds.sem_nsems; nsems = ds.sem_nsems;
if (!nsems) if (nsems < 64)
nsems = 1; nsems = 64;
s.array = calloc(nsems, sizeof(*s.array)); s.array = calloc(nsems, sizeof(*s.array));
if (s.array) { if (s.array) {
ret = semctl(sem_id, 2, GETALL, s); ret = semctl(sem_id, 2, GETALL, s);
(void)ret; (void)ret;
#if defined(SETALL) && 0 #if defined(SETALL) && 0
/* /*
* SETALL across the semaphores will clobber the state * SETALL across the semaphores will clobber the state
* and cause waits on semaphores because of the unlocked * and cause waits on semaphores because of the unlocked
* state change. Currenltly this is disabled. * state change. Currenltly this is disabled.
*/ */
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)