fspr_arch_threadproc.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* Licensed to the Apache Software Foundation (ASF) under one or more
  2. * contributor license agreements. See the NOTICE file distributed with
  3. * this work for additional information regarding copyright ownership.
  4. * The ASF licenses this file to You under the Apache License, Version 2.0
  5. * (the "License"); you may not use this file except in compliance with
  6. * the License. You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #include "fspr_thread_proc.h"
  17. #include "fspr_file_io.h"
  18. #ifndef THREAD_PROC_H
  19. #define THREAD_PROC_H
  20. #define APR_THREADATTR_DETACHED 1
  21. #define SHELL_PATH "cmd.exe"
  22. #define APR_THREAD_STACKSIZE 65536
  23. struct fspr_threadattr_t {
  24. fspr_pool_t *pool;
  25. unsigned long attr;
  26. fspr_size_t stacksize;
  27. };
  28. struct fspr_thread_t {
  29. fspr_pool_t *pool;
  30. struct fspr_threadattr_t *attr;
  31. unsigned long tid;
  32. fspr_thread_start_t func;
  33. void *data;
  34. fspr_status_t exitval;
  35. };
  36. struct fspr_threadkey_t {
  37. fspr_pool_t *pool;
  38. unsigned long *key;
  39. };
  40. struct fspr_procattr_t {
  41. fspr_pool_t *pool;
  42. fspr_file_t *parent_in;
  43. fspr_file_t *child_in;
  44. fspr_file_t *parent_out;
  45. fspr_file_t *child_out;
  46. fspr_file_t *parent_err;
  47. fspr_file_t *child_err;
  48. char *currdir;
  49. fspr_int32_t cmdtype;
  50. fspr_int32_t detached;
  51. };
  52. struct fspr_thread_once_t {
  53. unsigned long sem;
  54. char hit;
  55. };
  56. #endif /* ! THREAD_PROC_H */