SCTP Discussions

Text archives Help


Re: [SCTP-Discussion] Global variables in sctplib


Chronological Thread 
  • From: Michael Tuexen <Michael.Tuexen AT micmac.franken.de>
  • To: Oleg Levy <buskila AT gmail.com>
  • Cc: discussion AT sctp.de
  • Subject: Re: [SCTP-Discussion] Global variables in sctplib
  • Date: Tue Jan 10 13:42:05 2006
  • List-id: SCTP Discussions <discussion.sctp.de>

Hi,

see my comments in-line.

Best regards
Michael

On Jan 9, 2006, at 23:28 Uhr, Oleg Levy wrote:


I was wondering about the use of global variables in the library. It seems that many functions use mdi_readXXXXXXX() functions to access state information for various blocks of the library and in turn, the currentAssociation variable is used by the mdi_readXXXXXXX() functions.
 
I'd like to understand the reasoning behind this and also, how multi threaded applications could work given the fact that the currentAssociation variable is shared between all threads (if i understand this correctly)
That design is historic.... If you want to use it in a multithreaded application you must
use a mutex for the sctplib. See the socketapi implementation, which does exactly that.
 
thanks
 




Archive powered by MHonArc 2.6.19+.

Top of page