123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include "pthread.h"
- #include "implement.h"
- int
- pthread_kill (pthread_t thread, int sig)
- {
- int result = 0;
- pte_thread_t * tp;
- pte_osMutexLock (pte_thread_reuse_lock);
- tp = (pte_thread_t *) thread.p;
- if (NULL == tp
- || thread.x != tp->ptHandle.x
- || 0 == tp->threadId)
- {
- result = ESRCH;
- }
- pte_osMutexUnlock(pte_thread_reuse_lock);
- if (0 == result && 0 != sig)
- {
-
- result = EINVAL;
- }
- return result;
- }
|