Makefile.in test_str03c
Peter Wächtler <[email protected]>
| Newsgroups | gmane.linux.ngpt.devel |
|---|---|
| Message-ID | <[email protected]> |
in Makefile.in:204 add a missing @TEST_LINKLIB@ for target test_str03c
replace open("test_str03m",...) with shm_open("test_str03m",...) in
test_str03.c:532
test_str03c.c: 57
and ditto with shm_unlink:
test_str03c.c: 55
BTW, why not using ftruncate to zero the shmem?
If ngptinit is not called, the test progs eat a HUGE amount of RAM.
In test_str03.c:537 the mmap size is wrong:
sa = (shared_area_t *)mmap(NULL, (sizeof(struct pthread_mutex_t *)),
that's too small, it has to be sizeof(shared_area_t)
And the "locking" seems strange ... why busy waiting on sa->locked
to become "1" - if we never set it back to "0" - don't we have a
mutex?
And we destroy the shared mutex on exit?
I think it should be moved to test_str03c when (re)initializing the shmen.
I will create some test programs for myself.