Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 vxWorks Real-Time 进程中,您可以将环境变量作为主例程的参数之一传递。
如何在内核上下文中使用环境变量?
Vxworks 环境变量支持由 envLib 提供。
使用putenv("VAR=value")设置环境变量的值。
使用char* var = getenv("VAR")检索值。
直接从 VxWorks shell 调用它:
putenv "<VARIABLE NAME>=<VALUE>"
替换为您的环境变量名称和您要设置的值。