Lines Matching refs:shellCB
52 static void ShellDeinit(ShellCB *shellCB) in ShellDeinit() argument
54 (void)pthread_mutex_destroy(&shellCB->historyMutex); in ShellDeinit()
55 (void)pthread_mutex_destroy(&shellCB->keyMutex); in ShellDeinit()
56 OsShellKeyDeInit((CmdKeyLink *)shellCB->cmdKeyLink); in ShellDeinit()
57 OsShellKeyDeInit((CmdKeyLink *)shellCB->cmdHistoryKeyLink); in ShellDeinit()
58 (void)free(shellCB); in ShellDeinit()
61 static int OsShellCreateTask(ShellCB *shellCB) in OsShellCreateTask() argument
78 ret = ShellTaskInit(shellCB); in OsShellCreateTask()
83 shellCB->shellEntryHandle = pthread_self(); in OsShellCreateTask()
134 ShellCB *shellCB = NULL; in main() local
145 shellCB = (ShellCB *)malloc(sizeof(ShellCB)); in main()
146 if (shellCB == NULL) { in main()
149 ret = memset_s(shellCB, sizeof(ShellCB), 0, sizeof(ShellCB)); in main()
154 ret = pthread_mutex_init(&shellCB->keyMutex, NULL); in main()
159 ret = pthread_mutex_init(&shellCB->historyMutex, NULL); in main()
164 ret = (int)OsShellKeyInit(shellCB); in main()
168 (void)strncpy_s(shellCB->shellWorkingDirectory, PATH_MAX, "/", 2); /* 2:space for "/" */ in main()
170 sem_init(&shellCB->shellSem, 0, 0); in main()
172 g_shellCB = shellCB; in main()
173 ret = OsShellCreateTask(shellCB); in main()
175 ShellDeinit(shellCB); in main()
180 ShellEntry(shellCB); in main()
183 (void)pthread_mutex_destroy(&shellCB->historyMutex); in main()
185 (void)pthread_mutex_destroy(&shellCB->keyMutex); in main()
187 (void)free(shellCB); in main()