From mboxrd@z Thu Jan 1 00:00:00 1970 From: valdis.kletnieks@vt.edu (valdis.kletnieks at vt.edu) Date: Tue, 10 Oct 2017 03:50:09 -0400 Subject: boot time variable In-Reply-To: <20171009231709.GB20083@eros> References: <20171009231709.GB20083@eros> Message-ID: <39732.1507621809@turing-police.cc.vt.edu> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Tue, 10 Oct 2017 10:17:09 +1100, "Tobin C. Harding" said: > I would like to create a boot time variable i.e a variable that is set once at boot time. Variable > does not need to be globally accessible. (actually I am using two variables). The canonical way to have stuff happen at boot is usually declaring an initcall. > how/where to initialize the lock in a race free manner? Step 0: Figure out how once-at-boot code could *possibly* be called a second time. What are you worried about racing here? -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 486 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20171010/35645399/attachment.bin