-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, On May 7, 2010, at 10:37 AM, Mindaugas Rasiukevicius wrote:
Hello, Michael <macallan%netbsd.org@localhost> wrote:I recently ran into this problem - there is no easy way to determine wether it is safe to call kmem_alloc() yet ( as in, are we far enough through startup ) and when we call it too early the whole thing just hangs. Any chance to just have kmem_alloc() immediately return NULL if it isn't ready yet so we can fail gracefully instead of hanging?Such handling, i.e. in kmem(9), seems like a wrong approach to me. Caller can check the 'cold' variable, which is unset in configure2(). Although it does not clearly define what condition is "non-cold".
We get out of cold WAY later than that. In fact kmem is ready before autoconfig starts and cold is only cleared after that.
have fun Michael -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iQEVAwUBS+Rm68pnzkX8Yg2nAQKe5AgAuawn7E2sZscnUJA5JEOfqNQm/VSy5rnf z8V7+SUOjGyrys+5uaBe/hM9VWgc1vw6A/8e2nbzQGlES4dyVBr13IU8ZKTCKoFg nZwUEPXNToRY/WGWQQce6RcaGIoJKT/Pp5NIlAZ72o7dW1m/MUf7pS8QohD8sI/2 3ZC8bMGYjFCmmEWghjJO/HCjkPOVQzmaxKfwn+y5/hqGW1KccqK1gRs6yuKSWuit XHsm8qW0pb2KCc4RG3X9xDh5+vK2bULXTqEG5vfiUM3Ze3AIBP+DMs/BKBwpbI44 7Xei4FA9oePAphr9pAfS7zUbYZIgiOC7CM5f3aLDu+MdApkK5N0dKQ== =wSo/ -----END PGP SIGNATURE-----