Skip to content

Commit

Permalink
cmcode condition var handling
Browse files Browse the repository at this point in the history
  • Loading branch information
slaakko committed Dec 17, 2020
1 parent 14d5559 commit 901c240
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 14 deletions.
4 changes: 2 additions & 2 deletions cmajor/config/cmcode.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
,
"mainWindowNormalSize" :
{
"h" : 884,
"w" : 1854
"h" : 728,
"w" : 1790
}
,
"mainWindowWindowState" : 0,
Expand Down
2 changes: 2 additions & 0 deletions cmajor/projects/cm/cmcode/Main.cm
Original file line number Diff line number Diff line change
Expand Up @@ -370,13 +370,15 @@ namespace cmcode
helpMenuItem->AddMenuItem(aboutMenuItem.Release());
menuBar->AddMenuItem(helpMenuItem.Release());

/* Uncomment to enable trace menu:
UniquePtr<MenuItem> traceMenuItem(new MenuItem("&Trace"));
UniquePtr<MenuItem> startStopTraceMenuItemPtr(new MenuItem("&Start"));
startStopTraceMenuItem = startStopTraceMenuItemPtr.Get();
startStopTraceMenuItemPtr->SetShortcut(Keys.f2);
startStopTraceMenuItemPtr->ClickEvent().AddHandler(StartStopTraceClick);
traceMenuItem->AddMenuItem(startStopTraceMenuItemPtr.Release());
menuBar->AddMenuItem(traceMenuItem.Release());
*/

UniquePtr<ToolBar> toolBarPtr(new ToolBar(30, ToolButtonToolTipColor(), Color.DefaultBitmapTransparent(), ToolBar.Style.regular,
Padding(4, 4, 4, 4), Padding(2, 0, 2, 0)));
Expand Down
4 changes: 2 additions & 2 deletions cmajor/projects/cm/cmcode/cmcode.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
,
{
"content" : "",
"fileHash" : "48CAEFA33DCBC3FF65BE6EC80701154AAC4AA261",
"fileHash" : "5472A70C4AA46398772987CA21449177A6DE09F1",
"fileId" : "Main_140E041ED4991E376FC5CD4B0D379C6EE2DC64B2",
"filePath" : "C:\/work\/cmajorm\/cmajor\/projects\/cm\/cmcode\/Main.cm",
"info" : ""
Expand Down Expand Up @@ -158,7 +158,7 @@
,
"info" : "",
"projectFilePath" : "C:\/work\/cmajorm\/cmajor\/projects\/cm\/cmcode\/cmcode.cmp",
"projectHash" : "A4E768CA097EE1DECDCBB15F6BFCE56DA9F32889",
"projectHash" : "BEFD1A725FD0DEB389A8980FC4F86F35790178A7",
"projectId" : "project_cmcode_09657C0F80D57B861C169CDD26F697CB0223E3EB",
"projectName" : "cmcode",
"target" : "winguiapp"
Expand Down
2 changes: 1 addition & 1 deletion cmajor/projects/cm/cmcode/log/build-reply.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"requestErrorMessage" : "",
"requestValid" : true,
"success" : true,
"time" : "16 seconds"
"time" : "1 second"
}
2 changes: 1 addition & 1 deletion cmajor/projects/cm/cmcode/log/build-request.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"disableModuleCache" : false,
"emitIR" : false,
"emitOptIR" : false,
"filePath" : "C:\/work\/cmajorm\/cmajor\/system\/platform\/windows\/System.cms",
"filePath" : "C:\/work\/cmajorm\/cmajor\/projects\/examples\/Hello\/Hello.cmp",
"forceDebugInfo" : false,
"forceNoDebugInfo" : false,
"justMyCode" : false,
Expand Down
1 change: 0 additions & 1 deletion cmajor/projects/cm/service/BuildService.cm
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ namespace Cm.Service.Build
stopKeepAlives = false;
while (!stopKeepAlives)
{
LockGuard<RecursiveMutex> lock(keepAliveMutex);
if (stopKeepAlivesVar.WaitFor(keepAliveMutex, StopKeepAlives, null, Duration.FromSeconds(defaultKeepAliveIntervalSeconds)))
{
return;
Expand Down
6 changes: 3 additions & 3 deletions cmajor/projects/cm/service/Cm.Service.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
,
{
"content" : "",
"fileHash" : "62BD738F9E6DA5B2DAEE45555F0C253B340F56A3",
"fileHash" : "BD4E76ADCEBF67554A22A271EA7DECC11083A001",
"fileId" : "BuildService_B5477952EB8D28503492FEE55BD3744BA2B5B9A6",
"filePath" : "C:\/work\/cmajorm\/cmajor\/projects\/cm\/service\/BuildService.cm",
"info" : ""
}
,
{
"content" : "",
"fileHash" : "5B815775153C8B36BED1312983D0232036CCFA12",
"fileHash" : "6A5A94DCDD371136054DBDBA08FD858ABF8F5793",
"fileId" : "CmdbSession_8C309AA10B76AD974CFB053D9A384F996B3F6BEC",
"filePath" : "C:\/work\/cmajorm\/cmajor\/projects\/cm\/service\/CmdbSession.cm",
"info" : ""
Expand Down Expand Up @@ -82,7 +82,7 @@
,
"info" : "",
"projectFilePath" : "C:\/work\/cmajorm\/cmajor\/projects\/cm\/service\/Cm.Service.cmp",
"projectHash" : "523ACDA527FB09743B8EB05778AA32918BE7EDE7",
"projectHash" : "C3A511E74808E8433D710B14D4990C942E19359D",
"projectId" : "project_Cm.Service_D219517545C924A7168FB331FCA4605ACCBEA75E",
"projectName" : "Cm.Service",
"target" : "library"
Expand Down
3 changes: 0 additions & 3 deletions cmajor/projects/cm/service/CmdbSession.cm
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ namespace Cm.Service.Run
}
public CmdbSessionRequest* GetRequest()
{
LockGuard<RecursiveMutex> lock(mtx);
if (requestVar.WaitFor(mtx, RequestWaiting, null, Duration.FromMilliseconds(250)))
{
requestWaiting = false;
Expand Down Expand Up @@ -295,7 +294,6 @@ namespace Cm.Service.Run
request.Reset(new CmdbInputRequest(this));
requestVar.NotifyOne();
{
LockGuard<RecursiveMutex> lock(mtx);
replyVar.Wait(mtx, ReplyReady, null);
if (!reply.IsNull() && (reply.Get() is CmdbInputReply*))
{
Expand Down Expand Up @@ -339,7 +337,6 @@ namespace Cm.Service.Run
request.Reset(new CmdbOutputRequest(this, handle, output));
requestVar.NotifyOne();
{
LockGuard<RecursiveMutex> lock(mtx);
replyVar.Wait(mtx, ReplyReady, null);
}
requestWaiting = false;
Expand Down
3 changes: 2 additions & 1 deletion cmajor/system/System.Runtime/System.Runtime.cmproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<CustomProjectExtensionsPath>$(LocalAppData)\CustomProjectSystems\Cmajor\</CustomProjectExtensionsPath>
<ProjectGuid>b8f07c18-c35c-4e5f-8bdc-11eb0ce4efc0</ProjectGuid>
<ProjectGuid>21efb5f7-6acf-402d-92e5-9f4593e38b15</ProjectGuid>
</PropertyGroup>
<PropertyGroup>
<TargetType>library</TargetType>
Expand All @@ -13,6 +13,7 @@
<CmCompile Include="Os.cm"/>
<CmCompile Include="Runtime.cm"/>
<CmCompile Include="StaticInitCriticalSection.cm"/>
<CmCompile Include="Tracer.cm"/>
<CmCompile Include="Unwind.cm"/>
<CmCompile Include="Win.cm"/>
</ItemGroup>
Expand Down
Binary file modified setup/setup.ise
Binary file not shown.

0 comments on commit 901c240

Please sign in to comment.