home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume14 / sharedmem / part01 / src / cm.lisp < prev    next >
Encoding:
Text File  |  1988-05-17  |  1.6 KB  |  54 lines

  1.                 ; load in calls for common memory package
  2.                 ; Don Libes
  3.  
  4. (cfasl '/usr/local/lib/Luser.o '_Lcm_init 'cm_init    "function"
  5.     "/usr/local/lib/libcm.a /usr/local/lib/libstream.a")
  6. (getaddress
  7.  '_Lcm_declare            'cm_declare        "integer-function"
  8.  '_Lcm_undeclare        'cm_undeclare        "subroutine"
  9.  '_Lcm_sync            'cm_sync        "integer-function"
  10.  '_Lcm_set_value        'cm_set_value        "subroutine"
  11.  '_Lcm_get_value        'cm_get_value        "subroutine"
  12.  '_Lcm_set_new_command_value    'cm_set_new_command_value "integer-function"
  13.  '_Lcm_new_command_pending    'cm_new_command_pending    "integer-function"
  14.  '_Lcm_get_new_command_value    'cm_get_new_command_value "integer-function"
  15.  '_Lcm_status_equal        'cm_status_equal    "integer-function"
  16.  '_Lcm_status_synchronized    'cm_status_synchronized    "integer-function"
  17.  '_Lcm_set_status_value        'cm_set_status_value    "subroutine"
  18.  '_Lcm_print_variable        'cm_print_variable    "subroutine"
  19.  '_Lcm_exit            'cm_exit        "subroutine"
  20. )
  21.  
  22. ; access types, i.e. roles
  23. (setq oldibase ibase)
  24. (setq ibase 8)
  25. (setq CM_ROLE_NULL            000)
  26. (setq CM_ROLE_READER            001)
  27. (setq CM_ROLE_WAKEUP            002)
  28. (setq CM_ROLE_NONXWRITER        004)
  29. (setq CM_ROLE_NONEXCLUSIVE_WRITER    004)
  30. (setq CM_ROLE_EXCLUSIVE_WRITER        014)
  31. (setq CM_ROLE_XWRITER            014)
  32. (setq ibase oldibase)
  33.  
  34. (setq CM_WAIT                0)
  35. (setq CM_NO_WAIT            1)
  36. (setq CM_WAIT_FOR_ALL            0)
  37. (setq CM_WAIT_AT_MOST_ONCE        2)
  38. (setq CM_WAIT_READ            4)
  39.  
  40. ;(setq CM_WAIT                0)
  41. ;(setq CM_NO_WAIT            1)
  42. ;(setq CM_WAIT_FOR_ALL            2)
  43. ;(setq CM_WAIT_AT_MOST_ONCE        3)
  44.  
  45. ; define common memory value
  46. (c-declare
  47.     (struct cm_value
  48.         (data * char)
  49.         (msize unsigned-short)
  50.         (size unsigned-short)
  51.         (mallocable char)    
  52.     )
  53. )
  54.