1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s3:torture: replace shm_setup() with anonymous_shared_allocate()

metze
This commit is contained in:
Stefan Metzmacher 2012-07-25 08:33:31 +02:00
parent c66a45d3f2
commit e0bc165080
2 changed files with 4 additions and 4 deletions

View File

@ -76,7 +76,7 @@ void nb_alarm(int ignore)
void nbio_shmem(int n)
{
nprocs = n;
children = (struct children *)shm_setup(sizeof(*children) * nprocs);
children = (struct children *)anonymous_shared_allocate(sizeof(*children) * nprocs);
if (!children) {
printf("Failed to setup shared memory!\n");
exit(1);

View File

@ -3555,7 +3555,7 @@ static bool run_oplock2(int dummy)
size_t nread;
NTSTATUS status;
shared_correct = (volatile bool *)shm_setup(sizeof(bool));
shared_correct = (volatile bool *)anonymous_shared_allocate(sizeof(bool));
*shared_correct = True;
use_level_II_oplocks = True;
@ -8871,13 +8871,13 @@ static double create_procs(bool (*fn)(int), bool *result)
synccount = 0;
child_status = (volatile pid_t *)shm_setup(sizeof(pid_t)*torture_nprocs);
child_status = (volatile pid_t *)anonymous_shared_allocate(sizeof(pid_t)*torture_nprocs);
if (!child_status) {
printf("Failed to setup shared memory\n");
return -1;
}
child_status_out = (volatile bool *)shm_setup(sizeof(bool)*torture_nprocs);
child_status_out = (volatile bool *)anonymous_shared_allocate(sizeof(bool)*torture_nprocs);
if (!child_status_out) {
printf("Failed to setup result status shared memory\n");
return -1;