Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/lamont/src/compiler/c-target/fragments/seq-new.in
ViewVC logotype

Diff of /branches/lamont/src/compiler/c-target/fragments/seq-new.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2268, Thu Mar 7 12:53:00 2013 UTC revision 2269, Thu Mar 7 13:56:24 2013 UTC
# Line 1  Line 1 
1  //! add an allocated new strand to the world  //! add an allocated new strand to the world
2   uint32_t  Diderot_AllocNewStrand(   uint32_t  Diderot_AllocNewStrand(
3      StrandPoolInfo_t   * poolInfo,      StrandPoolInfo_t   * poolInfo,
4      @STRANDTY@ ** selfIn,      @STRANDTY@ **** selfIn,
5      @STRANDTY@ ** selfOut,      @STRANDTY@ **** selfOut,
6      uint8_t * status)      uint8_t *** status)
7  {  {
8      if(poolInfo->handle == poolInfo->size)      if(poolInfo->handle == poolInfo->size)
9      {      {
10          selfIn = (@STRANDTY@ **)CheckedReAlloc(selfIn,sizeof(@STRANDTY@ *) * (STRAND_POOL_INC_SIZE + poolInfo->size));          (*(*selfIn)) = (@STRANDTY@ **)CheckedReAlloc((*(*selfIn)),sizeof(@STRANDTY@ *) * (STRAND_POOL_INC_SIZE + poolInfo->size));
11          selfOut = (@STRANDTY@ **)CheckedReAlloc(selfOut,sizeof(@STRANDTY@ *) * (STRAND_POOL_INC_SIZE + poolInfo->size));          (*(*selfOut)) = (@STRANDTY@ **)CheckedReAlloc((*(*selfOut)),sizeof(@STRANDTY@ *) * (STRAND_POOL_INC_SIZE + poolInfo->size));
12          status = (uint8_t *)CheckedReAlloc(status,sizeof(uint8_t) * (STRAND_POOL_INC_SIZE + poolInfo->size));          (*(*status)) = (uint8_t *)CheckedReAlloc( (*(*status)),sizeof(uint8_t) * (STRAND_POOL_INC_SIZE + poolInfo->size));
13          poolInfo->size += STRAND_POOL_INC_SIZE;          poolInfo->size += STRAND_POOL_INC_SIZE;
14    
15          for(int i = poolInfo->handle; i < poolInfo->size; i++)          for(int i = poolInfo->handle; i < poolInfo->size; i++)
16          {          {
17              selfIn[i] = NEW(@STRANDTY@);              (*(*selfIn))[i] = NEW(@STRANDTY@);
18              selfOut[i] = NEW(@STRANDTY@);             (*(*selfOut))[i] = NEW(@STRANDTY@);
19              status[i] = DIDEROT_ACTIVE;              (*(*status))[i] = DIDEROT_ACTIVE;
20          }          }
21      }      }
22    

Legend:
Removed from v.2268  
changed lines
  Added in v.2269

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0