Граф коммитов

156 Коммитов

Автор SHA1 Сообщение Дата
Matt Durak 78b5281143
Add real_threadpool_thandle for convenience in UTs (#405)
* Add real_threadpool_thandle for convenience in UTs
2024-11-04 09:54:16 -08:00
Nishikant Deshmukh 6aaa879511
Specs for threadpool_open move to threadpool_create and threadpool_cl… (#403)
* Specs for threadpool_open move to threadpool_create and threadpool_close to threadpool_dispose

* Addressed Dan's comments

* Missing SRS_THREADPOOL_WIN32_01_006 added back

* Pushing some of the missing changes and some new changes

* More changes

* One more change remaining

* Removed the backtick
2024-10-31 13:29:12 -07:00
Jelani Brandon b593eda612
Revert check in for Socket transport (#392)
* reverting files

* fixing reverted changes

---------

Co-authored-by: Jelani Brandon <jebrando@microsoft.com>
2024-10-21 18:24:53 +00:00
anporumb 752bec6839
fixes for EBS repo and remove c_pal_interfacesmocks (#391)
* c_pal_umocktypes should link with c_pal_reals

* no need to build a mock library for c_pal_interface

* take out pal_ll_interfaces_mocks

* make call_once_ut compile

* better reals for async_socket

* added (void) to void functions

* add real socjket transport / socket for win32

* added reals for sokcet transport on linux

* async socket uses socket transport

* added real async socket for linux

* socket_transport has unbalanced } in C++ lands

* reals changes

* windows compiles now

* better but still doesn't compile on linux

* now it all compiles

* added stdint.h after CR
2024-10-18 11:41:44 -07:00
samrach9 ab26b45658
initial integrations of socket_transport into async_socket (#354)
* initial integrations of socket_transport into async_socket

---------

Co-authored-by: Jelani Brandon <jebrando@microsoft.com>
2024-10-16 10:27:20 -07:00
anporumb 0fee3af5d5
add the smallest precompiled header and use it in 1x project. (#384)
* meek attempt to have a mocks library with precompiled header

* this creates by hand win32_ll_mocks and uses it in call_once_ut_exe_c_pal

* mock loibrary for c_pal_interfaces is build with a function

* propagate_all_repos anporumb/pchmock3

* itr also compiles but does NOT link on linux

* now it builds AND links on LINUX

* added a minimal explanation about exiting visual studio

* propagate_all_repos anporumb/pchmock3

* propagate_all_repos anporumb/pchmock3

* propagate_all_repos anporumb/pchmock3

* threadpool uses terminate_process

* make pal_ll_interfaces appear in Visual Studio

* it needs to be prefixed with inc

* extraneous files are removed

* write library name with capital letters

* use also for #ifdef

* propagate_all_repos anporumb/pchmock3

* propagate_all_repos anporumb/pchmock3

* propagate_all_repos anporumb/pchmock3

* propagate_all_repos anporumb/pchmock3

* propagate_all_repos anporumb/pchmock3

* propagate_all_repos anporumb/pchmock3

* propagate_all_repos anporumb/pchmock3

* use latest dependencies 10 Oct 2024

* remove C_PAL_INC_FOLDER

* make it compile with latest c-pal

* use latest dependencies 10 Oct 2024

* remove garbage from build folder

* use latest dependencies 10 Oct 2024

* propagate_all_repos anporumb/pchmock3

* use latest dependencies 10 Oct 2024

* use latest dependencies 10 Oct 2024
2024-10-11 10:26:22 -07:00
Jelani Brandon e8692afe7d
fix missing include in real file (#383)
Co-authored-by: Jelani Brandon <jebrando@microsoft.com>
2024-10-09 21:03:33 -07:00
Nishikant Deshmukh 9b78edc73e
Change Timeouts to UINT32_MAX (#382) 2024-10-07 19:46:56 +00:00
Nishikant Deshmukh a768b6241b
Threadpull Linux Implementation (#381)
* Spec changes to handle freeing the context after all tasks are completed and corresponding minor changes in threadpool_schedule_work

* Addressed Jelani's comments

* Corrected the verbage of assigning 0 for success in few of the Specs

* Threadpool Linux Implementation Initial Check In

* Fixed traceability issues #1

* Fixed traceability issues #2
2024-10-07 10:51:11 -07:00
Nishikant Deshmukh 878c8367b3
Spec changes to handle freeing the context after all tasks are comple… (#373)
* Spec changes to handle freeing the context after all tasks are completed and corresponding minor changes in threadpool_schedule_work

* Addressed Jelani's comments

* Corrected the verbage of assigning 0 for success in few of the Specs
2024-09-25 16:47:40 -07:00
Nishikant Deshmukh 71e315817c
Threadpool WIN32 changes implementation (#371)
* Threadpool WIN32 changes implementation

* Fixed few unit-tests and memory leaks
2024-09-19 14:52:53 -07:00
Navya Gaur 27c3d6f2ca
Added method to get time elapsed in seconds without creating a timer (#369)
* Added a new method timer_global_get_elapsed in timer_win32.c
timer_global_get_elapsed calculates time elapsed in seconds
Added a new test case in timer_win32_ut.c file to test the new method
Added spec for this new method

* Added global_timer_state_reset method to reset g_timer_state variable to 0 after each test case
Added an UT for g_timer_get_elapsed_in_us_succeeds to test timer_global_get_elapsed_us
Added global_timer_state_reset in interface file

* Added suffix _s to timer_global_get_elapsed
Added implementation for timer_global_get_elapsed_s in timer_linux.c
Added releavnt ut and specs in timer_linux_ut.c and timer_linux_requirements.md

* Added reference to spec for test case in timer_win32_ut.c

* Defining a macro with real_ prefix to avoid conflict with existing functions defined

* Added macro for global_timer_state_reset for avoid conflict with any existing method

* Added integration test for timer_global_get_elapsed_s()

---------

Co-authored-by: Navya Gaur <navyagaur@microsoft.com>
2024-09-19 13:33:49 +05:30
Jasmine Lo 17e13e9be2
fix build error (#368) 2024-09-10 12:28:53 -07:00
Nishikant Deshmukh cc9697529c
Fixing the failed merge in threadpool_specs_pt2 branch (#366) 2024-09-04 17:47:13 +00:00
Nishikant Deshmukh d558f1cc7e
Nisdeshmukh/threadpool specs pt2 (#365)
* Initial checkin with specs

* Fixed Traceability

* Fixed PVOID on Linux

* Fixed PVOID in threadpool.h

* Forgot to add threadpool.h into the commit, adding it now

* Addressed comments by Matt

* Addressed ALL comments by Matt

* Fixed some of the typos and requirement doc mismatches across the three interfaces, linux, win32

* Removed some dangling PVOID in linux implementation

* Fixing win32 reals and linux_reals

* Added the missing success message specs in threadpool_create_work_item

* Addressedd changes after discussion with Matt and Dan.

* Addressed Dan's comments

* Final comments from Dan resolved
2024-09-04 01:33:19 +00:00
Nishikant Deshmukh 8c1dd06fb3
Initial checkin with specs (#362)
* Initial checkin with specs

* Fixed Traceability

* Fixed PVOID on Linux

* Fixed PVOID in threadpool.h

* Forgot to add threadpool.h into the commit, adding it now

* Addressed comments by Matt

* Addressed ALL comments by Matt
2024-09-03 17:35:36 -07:00
samrach9 d79a408f35
adding two functions to socket_transport API (#359)
* adding two functions to socket_transport API

* changing function name

* small fixes
2024-08-19 11:30:52 -07:00
samrach9 f20caca657
adding timeout to socket_transport (#358)
* adding timeout to socket_transport

* iwyu fix

* adding define
2024-08-14 09:53:16 -07:00
samrach9 4edd494c91
adding socket_accept enum (#356)
* adding socket_accept enum

* changing to NO_CONNECTION

* adding SOCKET_ACCEPT_NO_CONNECTION to linux
2024-08-08 12:17:39 -07:00
Jelani Brandon cc9d870f5f
Set socket reuse option on linux listening socket (#350)
* set the linux socket listen reuse flag

---------

Co-authored-by: Jelani Brandon <jebrando@microsoft.com>
2024-07-11 11:35:24 -07:00
samrach9 ab33a95545
Socket transport sr (#347)
* unit tests for socket_transport_

* fixed memory leaks and reviews

* fixed int test and binding socket errors

* making socket_transport_create seperate APIs

* fix for linux test

* fixes to spec
2024-07-03 17:54:34 -07:00
Jelani Brandon c8450e7e4e
Initial check in for socket transport linux (#344)
---------

Co-authored-by: Jelani Brandon <jebrando@microsoft.com>
2024-07-02 04:14:51 -07:00
Jelani Brandon 9ae39553af
spec and header for socket transport module (#341)
---------

Co-authored-by: Jelani Brandon <jebrando@microsoft.com>
2024-06-19 08:42:01 -07:00
Jelani Brandon b9bc7ab2fa
changing async_socket open close signature (#338)
Co-authored-by: Jelani Brandon <jebrando@microsoft.com>
2024-05-15 20:46:19 -07:00
anporumb 1d6d29a682
make logging context thandlable (#337)
* before making reals for thandle_logging_context

* it doesn't compile

* update thandle_ll to expose types of functions

* with reals

* iwyu take 01 out of 99

* iwyu take 02 out of 99

* iwyu take 03 out of 99

* iwyu take 04 out of 99

* iwyu take 05 out of 99

* iwyu take 06 out of 99

* iwyu take 07 out of 99

* iwyu take 08 out of 99

* iwyu take 09 out of 99

* rename test name to something better
2024-05-14 11:22:43 -07:00
anporumb 7fe6b681f5
TIMER_GUARD rename to real_TIMER_GUARD (#330)
* TIMER_GUARD rename to real_TIMER_GUARD

* #define TIMER_GUARD                     real_TIMER_GUARD for linux too
2024-04-23 20:11:09 +00:00
David Robson 93f9dc7bf0
Add additional comments for the known linux timer problem. (#327)
* Add additional comments for the known problem, suggest long-term
improvements and how to reprodice. Also use MU_DEFINE_ENUM for
timer_work_guard state.

* Whitespace fix.
2024-04-22 21:50:23 +00:00
David Robson 87fd1d0356
Add a guard around the work function in timer callback. (#326)
Add a guard around the work function in timer callback, add a small wait to allow for timer_delete to clean up threads and ensure timer data is still allocated in the case when the timer executes immediately after timer_delete.

* Start with the proposed solution.
* threadpool linux int and UT passes.
* Add requirements and callback UT.
2024-04-09 09:45:44 -07:00
Matt Durak 104fc15292
Fix async_socket on linux (#313) 2024-03-08 17:10:31 -08:00
anporumb b2aebe0ac5
Anpo fix execution engine reals (#311)
* fix execution engine reals

* added also tests for execution engine, becuse those were missing
2024-03-05 22:09:25 -08:00
David Robson 47ee6cc488
Add real_thandle_helper.h and real_interlocked_undo_rename.h to c-pal… (#308)
* Add real_thandle_helper.h and real_interlocked_undo_rename.h to c-pal repo.
Add a document and unit test to show how to use.

---------

Co-authored-by: Matt Durak <mdurak@microsoft.com>
2024-03-01 18:02:41 +00:00
Jelani Brandon 45ab80518e
adding function to determine if a uuid is NIL. (#299)
Co-authored-by: Jelani Brandon <jebrando@microsoft.com>
2024-01-30 06:00:45 +00:00
Raj Vengalil 92a65aaeb6
Add srw lock low-level Linux implementation (#295) 2024-01-02 18:42:05 +05:30
Dan Cristoloveanu dccd19093f
Add gballoc_hl_size to be used by the heap detouring (#292)
* Add gballoc_hl_size to be used by the heap detouring

* Fix Linux-y stuff

* One more Linux fix

* Fix Linux test error

* Fix it harder

* Fix it harder

* Fix it harder

* One more fix
2023-12-13 18:05:48 -08:00
Dan Cristoloveanu 876f34700e
Add SRW_LOCK_LL_TRY_ACQUIRE_RESULT enum in .c file (#288) 2023-11-11 21:00:07 -08:00
Jelani Brandon e38b6930c2
fix threadpool_linux open to initialize variables (#279)
Co-authored-by: Jelani Brandon <jebrando@microsoft.com>
2023-10-17 08:36:50 -07:00
Jelani Brandon 1349508f19
Update Ubuntu OS to 22.04 (#277)
Co-authored-by: Jelani Brandon <jebrando@microsoft.com>
2023-10-06 22:52:13 +00:00
anporumb bdcd1ad58e
Anpo 06 oct 2023 update deps (#276)
* use latest dependencies 06 Oct 2023

* remove mymalloc
2023-10-06 15:15:40 -07:00
Dan Cristoloveanu d114e7dd29
Remove an extra unusued parameter statement (#274) 2023-10-03 21:27:56 -07:00
Dan Cristoloveanu d7a8df4896
Update dependencies (#273) 2023-10-03 20:19:02 -07:00
Raj Vengalil 777418ccd4
Add async socket notify (#270)
Add a new `async_socket_notify_io` API that can be used by callers to be notified when the underlying socket is ready to be written to or read from.
2023-10-03 13:38:10 +05:30
David Robson 30a0dd6fde
Add single_performance_counter to c-pal. (#272)
* Moving single_performance_counter to c-pal. Currently, this is a
Windows-only implementation.
2023-10-02 13:50:23 -07:00
Jelani Brandon 717a625b50
adding srw_lock_ll to linux (#268)
Co-authored-by: Jelani Brandon <jebrando@microsoft.com>
2023-09-08 13:29:34 +00:00
Jelani Brandon 869acb86f6
chore: combining linux and win32 execution engine param structures. (#265)
* chore: combining linux and win32 execution engine param structures

Co-authored-by: Jelani Brandon <jebrando@microsoft.com>
2023-08-31 23:42:50 +00:00
Parth Aggarwal 1660753384
Fix linux threadpool (#262)
* fix wrap around issue

* enable other tests

* iwyu fix
2023-08-03 21:01:20 +00:00
Parth Aggarwal a67e0009fc
Fix reals for srw linux (#260) 2023-07-31 21:24:35 +00:00
Parth Aggarwal e5dffe9d46
fixes (#259) 2023-07-27 22:52:04 +00:00
samrach9 7ecf7d49b6
error handling for linux and windows implementation (#257) 2023-07-21 09:30:16 -07:00
Jelani Brandon f8fa6a15b7
Add linux compiler checks (#255)
Co-authored-by: Jelani Brandon <jebrando@microsoft.com>
2023-07-20 17:42:51 +00:00
samrach9 ab50e4d34d
error_handling_linux_spec (#256) 2023-07-17 12:32:56 -07:00