This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Playing with memory pool and timeouts ...


Hi everybody !

Does someone know how to fill the last parametre of
cyg_semaphore_timed_wait() ?
Is it the number of ticks real (the system add itself the current realtime)
or must I pass 
to this fonction, as parametre, realtime + nb_ticks ?
I have the same question for the posix fonction mq_timedreceive() with its
structure timespec ...

Another thing; Andrew answered me the number of extra blocks (to calculate
the size to malloc for a 
mempoolspace knowing the size we want) is :
	(size/blocksize) - ((size/blocksize/8/blocksize) + 1
								(Thanks a
lot Andrew)
but : 	1) He told me also, that it's underestimate by 1, so can I change
the "+ 1" by "+ 2" ?
	2) Is it really size/blocksize/8/blocksize ? Is it really a division
of size by blocksize then
	a division by 8 the a division by blocksize ? For me it's the same
thing with
		(size * 8) / (blocksize ² ), am I right ?

Best regards !

A beginner who is learning a lot. Thanks for that !

Matthieu GIRARDIN

--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]