~ubuntu-branches/ubuntu/intrepid/ruby1.9/intrepid-updates

« back to all changes in this revision

Viewing changes to lib/monitor.rb

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-09-04 16:01:17 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070904160117-i15zckg2nhxe9fyw
Tags: 1.9.0+20070830-2ubuntu1
* Sync from Debian; remaining changes:
  - Add -g to CFLAGS.
* Fixes build failure on ia64.
* Fixes build failure with gcc-4.2 on lpia.
* Robustify check for target_os, fixing build failure on lpia.
* Set Ubuntu maintainer address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
      if timeout
92
92
        raise NotImplementedError, "timeout is not implemented yet"
93
93
      end
94
 
      @monitor.funcall(:mon_check_owner)
95
 
      count = @monitor.funcall(:mon_exit_for_cond)
 
94
      @monitor.send!(:mon_check_owner)
 
95
      count = @monitor.send!(:mon_exit_for_cond)
96
96
      begin
97
97
        @cond.wait(@monitor.instance_variable_get("@mon_mutex"))
98
98
        return true
99
99
      ensure
100
 
        @monitor.funcall(:mon_enter_for_cond, count)
 
100
        @monitor.send!(:mon_enter_for_cond, count)
101
101
      end
102
102
    end
103
103
    
114
114
    end
115
115
    
116
116
    def signal
117
 
      @monitor.funcall(:mon_check_owner)
 
117
      @monitor.send!(:mon_check_owner)
118
118
      @cond.signal
119
119
    end
120
120
    
121
121
    def broadcast
122
 
      @monitor.funcall(:mon_check_owner)
 
122
      @monitor.send!(:mon_check_owner)
123
123
      @cond.broadcast
124
124
    end
125
125
    
137
137
  
138
138
  def self.extend_object(obj)
139
139
    super(obj)
140
 
    obj.funcall(:mon_initialize)
 
140
    obj.send!(:mon_initialize)
141
141
  end
142
142
  
143
143
  #